import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); long M = scan.nextLong(); scan.close(); long k = 2; if(M % k == 0) { long a = M / k; System.out.println(k + " " + a); System.exit(0); } k = 3; boolean flag = false; while(k <= (long)Math.sqrt(M)) { if(M % k == 0) { flag = true; break; } k += 2; } if(flag) { long a = M / k; System.out.println(k + " " + a); }else { System.out.println(1 + " " + M); } } }