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