1176_D. Recover it!
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 
```python
from sys import stdin, stdout
import collections
import math
import heapq

def primes(n):
    """ Returns  a list of primes < n """
    sieve = [True] * n
    for i in range(3,int(n**0.5)+1,2):
        if sieve[i]:
            sieve[i*i::2*i]=[False]*((n-i*i-1)//(2*i)+1)
    return [2] + [i for i in range(3,n,2) if sieve[i]]
 
 
p = primes(2750132)

look_up = {}
 
i = 1
for num in p:
    look_up[num] = i
    i += 1

N = int(input())
#N,M = [int(x) for x in stdin.readline().split()] 

arr = [int(x) for x in stdin.readline().split()]

arr.sort()

h = []

freq = {}

for num in arr:
    heapq.heappush(h, -num)
    freq[num] = 0

#ans = []
while h:
    num = -heapq.heappop(h)
    if freq[num]>0:
        freq[num] -= 1
        continue
    
    if num in look_up:
        #ans.append(look_up[num])
        print(look_up[num],end=' ')
        freq[look_up[num]] += 1
    else:
        for i in range(2,num):
            if num%i==0:
                print(num,end=' ')
                freq[num//i] += 1
                break
```