n, k = gets.split.map(&:to_i) 2.upto(n) do |i| next if n % i != 0 puts n / i exit end puts 1