n, a = [int(i) for i in input().strip().split(' ')] x = [int(i) for i in input().strip().split(' ')] print(['YES', 'NO'][sum(x) / len(x) != a])