def main(): from sys import stdin readline=stdin.readline n, h = map(int, readline().split()) A = list(map(int, readline().split())) now = 1 for a in A: now *= a if now % h == 0: print('YES') exit() print('NO') main()