a, b = gets.split.map(&:to_i) if 1 == a.abs puts b return end puts (0 == b%a) ? (b/a) : 'NO'