import java.util.Scanner; public class Main { public static void main(String[] args) { // 標準入力から読み込む際に、Scannerオブジェクトを使う。 Scanner sc = new Scanner(System.in); // int 1つ分を読み込む int C = sc.nextInt(); int A = 1; int B = C; if(C%2==0) { A = 2; B = C/2; System.out.println(A + " " + B); } else { int SQ = (int)(Math.ceil(Math.sqrt((double)C))); for(int i = 3; i < SQ; i+=2) { if(C%i == 0) { A = i; B = C/i; System.out.println(A + " " + B); break; } } if(A == 1) { System.out.println(A + " " + B); } } } }