def main(): N, H = map(int, input().split()) A = list(map(int, input().split())) rest = 1 for a in A: rest = (rest * a) % H if rest == 0: print("YES") break else: print("NO") if __name__ == "__main__": main()