今天帕里和艾莉亚在玩一个名为“剩余者”的游戏。
Pari选择了两个正整数x和k,并告诉Arya k而不是x。Arya必须找出这个值。有n个古老的数字c1 c2…如果艾莉亚愿意,她必须告诉艾莉亚。已知k和古老的值,告诉我们Arya是否有一个独立于x值的制胜策略。从形式上讲,Arya真的能理解任何正整数x的值吗?
注意,这意味着x除以y后的余数。
输入的第一行包含两个整数n和k(1≤n, k≤1000000)−由Pari选择的古代整数的数量和值k。
第二行包含n个整数c1,c2,…ci, cn(1≤≤1000000)。
4 5
2 3 5 12
Yes
n the first sample, Arya can understand because 5 is one of the ancient numbers.
In the second sample, Arya can't be sure what is. For example 1 and 7 have the same remainders after dividing by 2 and 3, but they differ in remainders after dividing by 7.