n, a = gets.split.map(&:to_i) x_list = gets.split.map(&:to_i) if x_list.inject(:+) == a * n puts 'YES' else puts 'NO' end