#!/usr/bin/env python3 import sys import math def main(): N, H = map(int, input().split()) A = list(map(int, input().split())) # m = 1 # for i in A: # m *= i % H # m %= H # if m == 0: # print("YES") # return # print("NO") # return hh = H for i in A: g = math.gcd(i, hh) hh //= g if hh == 1: print("YES") return print("NO") return if __name__ == '__main__': main()