import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
import java.util.*;
public class Main
{
    public static void main(String args[]) throws IOException
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(System.out));
        long t=Long.parseLong(br.readLine());
        long n,n1=0;
        if(t==1)
        {
            bw.write(t+" "+t+"\n");
        }
        else{
            n=(long)Math.sqrt(t);
            while(n>=1)
            {
                if(t%n == 0)
                {
                    n1=t/n;
                    if(n1==n)
                     {
                         n--;
                     }
                     else{
                         break;
                     }
                }
            }
            if(n<n1)
            {
                bw.write(n+" "+n1+"\n");
            }
            else{
                bw.write(n1+" "+n+"\n");
            }
        }
        bw.flush();
    }
}