import java.util.*;
public class Main
{
    static long gcd(long a,long b)
    {
        if(b%a==0)
        return a;
        return gcd(b%a,a);
    }
    public static void main(String args[])
    {
        Scanner sc=new Scanner(System.in);
        long n=sc.nextLong();
        for(long i=2;i<(long)Math.sqrt((double)n);i++)
        {
            if(n%i==0&&n/gcd(i,n/i)!=n/i)
            {
                System.out.println(i+" "+n/i);
                return;
            }
        }
        System.out.println("1 "+n);
    }
}