

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();
       long ans=0;
      for(long i=1;i<=(long)Math.sqrt(n);i++)
      {
         if(n%i==0 && lcm(i,n/i)==n)
         {
            ans = i;
         }
      }

      System.out.println(ans+" "+(n/ans));
   }


   public static long lcm(long a, long b)

   { 

     return (a*b)/gcd(a,b);
  

   }
   

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

   }
   
   
   
}
