N, H = map(int,input().split()) A = list(map(int,input().split())) X = 1 for R in A: X *= R X %= H if X == 0: print('YES') else: print('NO')