#Lutece3182. 罗小黑
罗小黑
Migrated from Lutece 3182 罗小黑
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
罗小黑有一列正整数 。罗小黑喜欢最大公约数大于 的正整数可重集,所以罗小黑希望能够选择 ,满足:
可以从 中选出至少 个数,它们的最大公约数大于 。
如果有多个满足条件的 ,罗小黑希望找到 最大的。如果仍然有多个,罗小黑希望找到 最小的。如果找不到满足条件的,则
Input
第一行包含一个整数 。
接下来一行包含 个整数 。
Output
输出一行包含两个整数 。
Samples
1
1
0 0
5
1 2 1 2 1
1 4
Constraints