input = gets.split(" ").map(&:to_i) ans = input[1] % input[0] unless ans == 0 puts "NO" else puts input[1] / input[0] end