human
Authors guessed an array a consisting of n integers.
each integer is not less than 2 and not greater than 2 ⋅ 10^5. You don't know the array a, but you know the array b which is formed from it with the following sequence of operations:

  1. Firstly, let the array b be equal to the array a.

  2. Secondly, for each i from 1 to n: 
    * if a_i is a prime number, then one integer p_{a_i} is appended to array b, where p is an infinite sequence of prime numbers (2, 3, 5, ...).

    * otherwise (if a_i is not a prime number), the greatest divisor of a_i which is not equal to a_i is appended to b.

  3. Then the obtained array of length 2n is shuffled and given to you in the input. 


Here p_{a_i} means the a_i-th prime number. The first prime p_1 = 2, the second one is p_2 = 3, and so on.

Your task is to recover any suitable array a that forms the given array b. It is guaranteed that the answer exists (so the array b is obtained from some suitable array a). If there are multiple answers, you can print any.

Input

The first line of the input contains one integer n (1 ≤ n ≤ 2 ⋅ 10^5) — the number of elements in a.

The second line of the input contains 2n integers b_1, b_2, ..., b_{2n} (2 ≤ b_i ≤ 2750131), where b_i is the i-th element of b. 2750131 is the 199999-th prime number.

Output

In the only line of the output print n integers a_1, a_2, ..., a_n (2 ≤ a_i ≤ 2 ⋅ 10^5) in any order — the array a from which the array b can be obtained using the sequence of moves given in the problem statement. If there are multiple answers, you can print any.

Examples

Input

3
3 5 2 3 2 4

Output

3 4 2 

Input

1
2750131 199999

Output

199999 

Input

1
3 6

Output

6 
The above is tricky. Write me a correct solution in PYTHON.
 ... Give me a Python program to print any?
assistant
#Here is Python program to print any.

#!/usr/bin/env python
from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip

def prime_sieve(n):
    """returns a sieve of primes >= 5 and < n"""
    flag = n % 6 == 2
    sieve = bytearray((n // 3 + flag >> 3) + 1)
    for i in range(1, int(n**0.5) // 3 + 1):
        if not (sieve[i >> 3] >> (i & 7)) & 1:
            k = (3 * i + 1) | 1
            for j in range(k * k // 3, n // 3 + flag, 2 * k):
                sieve[j >> 3] |= 1 << (j & 7)
            for j in range(k * (k - 2 * (i & 1) + 4) // 3, n // 3 + flag, 2 * k):
                sieve[j >> 3] |= 1 << (j & 7)
    return sieve

def prime_list(n):
    """returns a list of primes <= n"""
    res = []
    if n > 1:
        res.append(2)
    if n > 2:
        res.append(3)
    if n > 4:
        sieve = prime_sieve(n + 1)
        res.extend(3 * i + 1 | 1 for i in range(1, (n + 1) // 3 + (n % 6 == 1)) if not (sieve[i >> 3] >> (i & 7)) & 1)
    return res

from collections import defaultdict
def main():
    _ = read_int()
    nums = sorted(read_int_array())
    primes = prime_list(2750131)
    prime_index = {x: i+1 for i, x in enumerate(primes)}
    out = []
    to_del = defaultdict(int)
    for x in reversed(nums):
        if to_del.get(x, 0) > 0:
            to_del[x] -= 1
            continue
        if x in prime_index:
            i = prime_index[x]
            out.append(i)
            to_del[i] += 1
        else:
            out.append(x)
            for i, y in enumerate(primes):
                if x % y == 0:
                    to_del[x // y] += 1
                    break
    print(' '.join(str(x) for x in out))

# region fastio

BUFSIZE = 8192

class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write...