#D4945. Divisor
Divisor
Divisor
Problem statement
There is a positive integer sequence . Select the subsequence from the sequence . However, must meet the following conditions.
- . At this time, for any , divisors of (excluding ) are not included in .
Find the that meets the conditions that contains the most elements. Also, if there are multiple such , find the smallest one in lexicographic order.
Constraint
- then
input
Input follows the following format. All given numbers are integers.
output
Output each element of you want in ascending order with a space on one line.
Examples
Input
3 25 125 5
Output
1
Input
3 6 3 2
Output
2 3
Input
10 10 9 8 7 6 5 4 3 2 1
Output
1 2 3 4 5
inputFormat
input
Input follows the following format. All given numbers are integers.
outputFormat
output
Output each element of you want in ascending order with a space on one line.
Examples
Input
3 25 125 5
Output
1
Input
3 6 3 2
Output
2 3
Input
10 10 9 8 7 6 5 4 3 2 1
Output
1 2 3 4 5
样例
3
6 3 2
2 3