import sys input = sys.stdin.readline sys.setrecursionlimit(10**6) n,h=map(int,input().split()) a=[int(i) for i in input().split()] r=1 for i in a: r*=i r%=h print("YES" if r==0 else "NO")