N, a = map(int, input().split()) l = list(map(int, input().split())) if int(sum(l)/N) == a: print("YES") else: print("NO")