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