import sys def debug(x, table): for name, val in table.items(): if x is val: print('DEBUG: {} -> {}'.format(name, val), file=sys.stderr) return None n, a = map(int, input().split()) x = [int(i) for i in input().split()] ave = sum(x) / n if a == ave: ans = 'YES' else: ans = 'NO' print(ans)