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