n, a = (int(i) for i in input().strip().split(' ')) lst = [int(i) for i in input().strip().split(' ')] x = 0.0 x += sum(lst) if x / n == a: print('YES') else: print('NO')