import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n, h = map(int, input().split())
    A = list(map(int, input().split()))
    t = 1
    for a in A:
        t *= a
        t %= h
    print("YES" if t == 0 else "NO")


if __name__ == '__main__':
    resolve()