from collections import defaultdict def pf(num): dic = defaultdict(int) i = 2 while num%i == 0: num //= i dic[i] += 1 i = 3 while i*i <= num: while num%i == 0: num //= i dic[i] += 1 i += 2 if num != 1: dic[num] += 1 return dic n,k = map(int, input().split()) alist = list(map(int, input().split())) kdic = pf(k) dic = defaultdict(int) for a in alist: adic = pf(a) for key, val in adic.items(): if key in kdic: if kdic[key] <= val: dic[key] = 1 for key in kdic.keys(): if dic[key] == 0: print("No") exit() print("Yes")