N, H = map(int, input().split()) A = map(int, input().split()) tmp = 1 for a in A: tmp *= a tmp %= H if not tmp: print('YES') exit() print('NO')