            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;
                          ArrayList<Long> a=new ArrayList<>();
                          
        while (n%2==0) 
        { 
            a.add(2L);
            n /= 2; 
        } 
        for (int i = 3; i <= Math.sqrt(n); i+= 2) 
        { 
            // While i divides n, print i and divide n 
            while (n%i == 0) 
            { 
                a.add((long)i);
                n /= i; 
            } 
        } 
        if (n > 2) 
            a.add(n);
            a.add(1L);
                          
                     Collections.sort(a);     
                      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.close();
                	}
                }