n, a = map(int, input().strip().split(" ")) x = sum([int(i) % a for i in input().strip().split(" ")]) if x == 0: print("YES") else: print("NO")