n, a =map(int, input().split()) x = map(int, input().split()) ans = 0 for i in x: ans += i ev = ans /n if ev == a: print('YES') else: print('NO')