N,H = map(int,input().split()) A = list(map(int,input().split())) MOD = 10**9 + 7 base = 1 for item in A: base *= item base //= MOD if base %H == 0: print('YES') else: print('NO')