n,a = map(int,input().split()) x = [int(i) for i in input().split()] if sum(x) / n == a: print('YES') else: print('NO')