Ski race
시간 제한1초메모리 제한1024 MB
서로 다른 정수 최대 100000개가 주어질 때, 다른 어떤 수도 X로 나누어떨어지지 않는 X를 오름차순으로 출력한다.
문제
Winter has come to the town of , and it's time for the first cross-country skiing race. This year, participants registered through the Internet --- they entered their data, and each picked a number which had not yet been picked by other skiers. Due to the high number of participants, the organizers decided to split the race into several starts. To pick the lucky skiers for the first start, they've come up with a simple rule --- the skier with the number comes to the start if no other skier's number is divisible by .
Help the organizers write a program to define the numbers of those who will start first.
입력
The first line of the input file contains an integer --- the number of registered participants (). The second line contains space-separated integers --- the numbers chosen by the participants at the registration (). All the numbers are distinct.
출력
The output file must contain a single line containing the numbers of all participants starting first, in the ascending order. Numbers must be space-separated.