n, a = map(int, input().split()) if n * a == sum(map(int, input().split())): print('YES') else: print('NO')