#P1753. Remainders Game

Remainders Game

题目描述

给定正整数 n,kn,knn 个正整数 c1,c2,...,cnc_1,c_2,...,c_n。如果对于任意正整数 xx,可以通过 xmodcix\mod c_i 的值推出 xmodkx\mod k 的值则输出 Yes 否则输出 No

输入格式

第一行两个整数 n,kn,k1n,k1061\le n,k\le 10^6

第二行 nn 个整数 cic_i1ci1061\le c_i\le 10^6

输出格式

输出 YesNo 表示答案。

4 5
2 3 5 12
Yes
2 7
2 3
No