/*
    Skadoosh!
    Whatever it takes.
 */
import java.io.*;
import java.util.*;
public class A
{
    private static void primeFact(long N)
    {
        long a=1,b=1,i=1,sqrt=(long)Math.sqrt(N);

        while (++i<=sqrt)
        {
            if(N%i==0)
            {
                while (N%i==0)
                    N/=i;
                if(b==1)
                    b=i;
                else
                {
                    a=i;
                    break;
                }
            }
        }
        if(N>1)
        {
            if(b==1)
                b=N;
            else
                a=N;
        }
        if(b<a)
        {
            long tmp=a;
            a=b;
            b=tmp;
        }
        System.out.println(a+" "+b);
    }
    public static void main(String[] args) throws IOException
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

        int i,N;

        long X=Long.parseLong(br.readLine().trim());
        primeFact(X);
    }
}