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