            import java.util.*;
            import java.lang.*;
            import java.io.*;
            
                public class ProblemA {
                public static void main (String[] args) {
                    PrintWriter pw=new PrintWriter(System.out);
                    Scanner sc=new Scanner(System.in);
                  
                          long n=sc.nextLong();
                          long m=n,s=1;
                        
      
        for (long i = (long)Math.sqrt(n-1); i >=1; i-=2) 
        { 
          if(n%i==0){
              int flag=0,i1=2;
                while(i1 <= m/2)
        {
            // condition for nonprime number
            if(m % i1 == 0)
            {
                flag = 1;
                break;
            }
            ++i1;
        }
        if(flag==1)
           {s=i;break;}
          }
        } 
       
                     /* if(a.get(a.size()-1)!=m/a.get(a.size()-1))
                      pw.println(a.get(a.size()-1)+" "+m/a.get(a.size()-1));
                      else
                      pw.println(1+" "+m);*/
                      pw.println(m/s+" "+s);
                    pw.close();
                	}
                }