n,h=map(int,input().split()) a=list(map(int,input().split())) now=1 for i in a: now*=i now%=h print('NO' if now else 'YES')