import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main{ static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); static long a, b ,a1, b1; public static void main(String[] args) throws NumberFormatException, IOException { int x = Integer.parseInt(br.readLine()); for (int i = 1; i < x; i++) { if (x % i == 0) { a = i; b = x / i; if (mcd(a, b) == 1) { a1 = b; b1 = x / b; } } } if (a1 < b1) { System.out.println(a1 + " " + b1); } else { System.out.println(b1 + " " + a1); } } public static long mcd(long a, long b) { if (b == 0) { return a; } return mcd(b, a % b); } }
	   	  		 		 	  	  	 		  		 	 	