//package graphs;
import java.util.*;
public class codeforces {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s=new Scanner(System.in);
		//int t=s.nextInt();
		long n=s.nextLong();
		int flag=0;
		long a=Long.MIN_VALUE,b=Long.MIN_VALUE;
		for(long i=2;i<=Math.sqrt(n);i++)
		{
			if(n%i==0)
			{
				if(gcd(i,n/i)==1&&(n/i>b))
				{
					flag=1;
					//System.out.println(a+" "+b);
					a=i;
					b=n/i;
				}
				
			}
		}
		if(flag==0)
			System.out.println(1+" "+n);
		else if(a%b==0||b%a==0)
			System.out.println(1+" "+n);
		else
			System.out.println(a+" "+b);
		
        
	}
	
	public static long gcd(long a,long b)
	{
		if(b==0)
			return a+b;
		return gcd(b,a%b);
	}
	public static int solve(int n,int buff,int score)
	{
		if(n<=0)
		{
			return score;
		}
		
		int op1=solve(n-1,buff,score+1);
		int op2=Integer.MIN_VALUE;
		int op3=Integer.MIN_VALUE;
		if(buff!=0)
		{
			op2=solve(n-1,buff,score+buff);
		}
		if(n>=3)
		{
			op3=solve(n-3,score,2*score);
		}
		
		return Math.max(op1,Math.max(op2, op3));
		
		
	}
	
	

}

 