import java.util.*;
import java.io.*;
//import java.lang.*;

public class Task{
public static long gcd(long a,long b){
	if(b==0){return a;}
	return gcd(b,a%b);
}

public static void main(String[] args) throws IOException{
       Scanner s=new Scanner(System.in);
       BufferedWriter out=new BufferedWriter(new OutputStreamWriter(System.out));
       StringBuilder sb=new StringBuilder();
       long n=s.nextLong(),xx=n;
       int k=(int)Math.sqrt(n)+1;int c=0;
       List<Long> l=new ArrayList<>();
       for(int i=1;i<=k;i++){
       	if(n%(long)i==0){c++;}
       }
       if(c==1){out.write("1 "+n+" ");}
       else{
       	   for(int i=2;i<=k;i++){
       	   	if(n<=1){break;}
       	   	if(n%(long)i==0){
       	   		l.add((long)1);
       	   		int x=l.size()-1;
       	   		while(n%(long)i==0){
       	   			n/=i;l.set(x,(long)l.get(x)*i);
       	   		}
       	   	}
       	       
       	   	}
       	   	if(n!=1){l.add(n);}
       	   	int kk=l.size();
       	   	long x=(long)1e12+1,y=x;
       	   	for(int i=0;i<(1<<kk);i++){
       	   		long tmp=1;
       	   		for(int j=0;j<kk;j++){
       	   			if((i&(1<<j))==1){
       	   				tmp*=l.get(j);
       	   			}
       	   		}
       	   		long tmp1=xx/tmp;
       	   		if(Math.max(tmp,tmp1)<Math.max(x,y)){
       	   			x=tmp;y=tmp1;
       	   		}
       	   	}
       	   	out.write(x+" "+y+" ");
       }
        out.flush();
       }
       	
       }
       
       
       	
       
       
       	
       
       
  
