import math n,k=map(int,input().split()) a=list(map(int,input().split())) now=1 for i in a: now=math.lcm(now,i) if now%k: print('No') else: print('Yes')