n,a = map(int,input().split()) x = list(map(int,input().split())) sum = 0 for i in x: sum += i if a == sum / n: print("YES") else: print("NO")