require 'prime' class Calc0136 def initialize(args) args = args.map { |l| l.chomp.split(/\s+/) } @n, @k = args.shift.map(&:to_i) @prime = Prime.instance end def run @n / @prime.prime_division(@n).first.first end end puts Calc0136.new(STDIN.readlines).run if __FILE__ == $0