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