/*
    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),copy=N;
        ArrayList<Long> list=new ArrayList<>();

        while (++i<=sqrt)
        {
            if(N%i==0)
            {
                long tmp=1;
                while (N%i==0)
                {
                    N /= i;
                    tmp*=i;
                }
                list.add(tmp);
            }
        }
        if(N>1)
            list.add(N);
        for(int j=0;j<list.size();j++)
        {
            if(j%2==0)
                a*=list.get(j);
            else
                b*=list.get(j);
        }

        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);
    }
}