import std; void main() { auto input = readln.split.to!(long[]); auto N = input[0], H = input[1]; auto A = readln.split.to!(long[]); writeln(A.fold!((a, b) => a * b % H) == 0 ? "YES" : "NO"); }