include Math M = gets.to_i m = (2..Math.sqrt(M).ceil).find {|n| M % n == 0} ans = [m, M / m].join(' ') puts ans