def main(): n, h = map(int, input().split()) arr = list(map(int, input().split())) if h == 1 or 0 in arr or h in arr: exit(print("YES")) cur = 1 for a in arr: if a < 0: a *= -1 cur = (cur * (a % h)) % h if cur == 0: print("YES") else: print("NO") if __name__ == "__main__": main()