import java.io.*;
import java.util.*;
public class Main{
      public static void main(String args[]) throws IOException{
            BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
            int x=Integer.parseInt(br.readLine());
            int a=1,b=x,c=1,d=x,min=x;
            for(int i=1;i<=x/2;i++){
                if(x%i==0 && i*i!=x){
                    c=i;
                    d=x/i;
                    if(Math.max(c,d)<min && Math.max(c,d)!=1){
                        a=c;
                        b=d;
                        min=Math.max(a,b);
                    }
                }
            }
            System.out.println(a+" "+b);
      }
}