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