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