a,b=gets.split.map(&:to_i);c=gets.split.map(&:to_i).inject(:+);puts c/a.to_f==b ? "YES" : "NO"