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