n, a = map(int, input().split()) data = map(int, input().split()) if a == (sum(data)/n): print("YES") else: print("NO")