a = gets.to_i b = gets.to_i if (a.abs<=b.abs && (b%a==0||b%a==-0)) p b/a else puts "NO" end