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