def check(): N, H = map(int, input().split()) A = list(map(int, input().split())) now = 1 for i in range(N): now = now*A[i]%H if now==0: return 'YES' return 'NO' print(check())