import sys
input = sys.stdin.readline

N, H = map(int, input().split())
A = list(map(int, input().split()))
now = 1

for Ai in A:
    now *= Ai
    now %= H

if now==0:
    print('YES')
else:
    print('NO')