

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

public class Main
{
    static class FastReader 
    { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader() 
        { 
            br = new BufferedReader(new
                     InputStreamReader(System.in)); 
        } 
  
        String next() 
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 
  
        int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } 
  
        long nextLong() 
        { 
            return Long.parseLong(next()); 
        } 
  
        double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    }

     public static long[] randomize(long arr[])
    {
        Random rand = new Random();
for (int i = 0; i < arr.length; ++i) {
   int index = rand.nextInt(arr.length - i);
   long tmp = arr[arr.length - 1 - i];
   arr[arr.length - 1 - i] = arr[index];
   arr[index] = tmp;
}

return arr;
    } 
    static long mod = 1000000007;

  
   public static void main (String[] args) throws java.lang.Exception
   {
       FastReader sc = new FastReader();
       
       long n=sc.nextLong();
       if(n==1)
         System.out.println(1+" "+1);
      else
      {
         List<Long> pf = pf(n);
         Collections.sort(pf);
         long a=1;
         for(int i=0;i<pf.size()-1;i++)
         {
            a=a*pf.get(i);
         }
         System.out.println(a+" "+pf.get(pf.size()-1));
      }
   }


   public static List<Long> pf(long n)
   {  List<Long> pf = new ArrayList<>();
      long ans=1;
      while(n%2==0)
      {
         ans = ans*2;
         n=n/2;
      }
      pf.add(ans);
      
      for(long i=3;i<=(long)Math.sqrt(n);i++){

         ans = 1;
         while(n%i==0)
         {
            ans = ans*i;
            n=n/i;
         }

         pf.add(ans);
      }

      if(n>2)
         pf.add(n);

      return pf;
   }
   
   
   
   
}
