from collections import * from itertools import * from functools import * from heapq import * import sys,math input = sys.stdin.readline n,a = map(int,input().split()) X = list(map(int,input().split())) if a*n == sum(X): print('YES') else: print('NO')