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