a, b = gets.split.map(&:to_i) if b % a != 0 puts "NO" else puts b / a end