n, a = [int(i) for i in input().split()] xs = [int(i) for i in input().split()] print('YES' if a == sum(xs) / n else 'NO')