import sys,math,itertools from collections import Counter,deque,defaultdict from bisect import bisect_left,bisect_right mod = 10**9+7 INF = float('inf') def inp(): return int(sys.stdin.readline()) def inpl(): return list(map(int, sys.stdin.readline().split())) n,h = inpl() a = inpl() now = 1 for x in a: now *= x now %= h print('YES' if now == 0 else 'NO')