N, H = map(int,input().split()) A = map(int,input().split()) prod = 1 for Ai in A: prod *= Ai print(['YES', 'NO'][0 if prod%H == 0 else 1])