Sona loves numbers. Sona loves only certain type of numbers especially prime numbers. She devised a  new definition for prime numbers. In a given set of positive integer X = {X0,X1,....Xn-1} Xi is prime only if there are no elements in X which are divisors of Xi (except Xi itself).

You are given the set X and find the elements which are prime for this set.

Input format

The first line contains an integer 'N' which denotes the size of the set and the next line contains N spaced integers which represents the elements of the set.

Output format

Print the elements which are prime for this set X

Constraints

1 ≤ N < = 100

1< = X[i] < = 10^6

SAMPLE INPUT
5
10 49 5 3 20

SAMPLE OUTPUT
49 5 3
'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
size=input()
arr=map(int,raw_input().split())
lis=[]
for i in range(size):
	c=0
	for j in range(size):
		if arr[j]!=0:
			if arr[i]%arr[j]==0 and c==0:
				c=1
			elif arr[i]%arr[j]==0 and c==1:
				break
	else:
		lis.append(arr[i])
for i in lis:
	print i,