import functools import operator N, H = map(int, input().split()) l_A = list(map(int, input().split())) result = functools.reduce(operator.mul, l_A) if result % H == 0: print("YES") else: print("NO")