a,b=gets.split.map{|e| e.to_i} c=gets.split.inject(0){|s,i| s+i.to_i} puts ((a*b==c)?"YES":"NO")