import sys import copy N,H = map(int,input().split()) lsA = list(map(int,input().split())) def factorization(a):#素因数分解√N arr = [] temp = a for i in range(2, int(-(-a**0.5//1))+1): if temp%i==0: cnt=0 while temp%i==0: cnt+=1 temp //= i arr.append([i, cnt]) if temp!=1: arr.append([temp, 1]) if arr==[]: arr.append([a, 1]) return arr #[素因数、個数] if 0 in lsA: print('YES') sys.exit() if H == 1: print('YES') sys.exit() lsp = factorization(H) for i in range(N): if not lsp: print('YES') sys.exit() k = lsA[i] for j in range(len(lsp)): p = lsp[j][0] while k % p == 0: lsp[j][1] -= 1 k //= p lsp2 = [] for j in range(len(lsp)): if lsp[j][1] > 0: lsp2.append(lsp[j]) lsp = copy.copy(lsp2) if not lsp: print('YES') sys.exit() print('NO')