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

public class TestClass {
	public static void main (String[] args)throws IOException {
	 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringTokenizer tk;
      OutputStream out = new BufferedOutputStream(System.out);
      PrintWriter ou = new PrintWriter(System.out);
     
      long n=Long.parseLong(br.readLine());
      
      
      long ans= maxPrimeFactors(n);
           
           if(ans==n/ans || (n/ans)%ans==0)
           {
               
               
               
               System.out.println(n+" "+1);
           }
           else
                System.out.println(ans+" "+n/ans);
                
           
                    
                    
                    
                    
                    
                }
        
        
         static long maxPrimeFactors(long n) 
    { 
        // Initialize the maximum prime 
        // factor variable with the 
        // lowest one 
        long maxPrime = -1; 
  
        // Print the number of 2s 
        // that divide n 
        while (n % 2 == 0) { 
            maxPrime = 2; 
  
            // equivalent to n /= 2 
            n >>= 1; 
        } 
  
        // n must be odd at this point, 
        // thus skip the even numbers 
        // and iterate only for odd 
        // integers 
        for (int i = 3; i <= Math.sqrt(n); i += 2) { 
            while (n % i == 0) { 
                maxPrime = i; 
                n = n / i; 
            } 
        } 
  
        // This condition is to handle 
        // the case when n is a prime 
        // number greater than 2 
        if (n > 2) 
            maxPrime = n; 
  
        return maxPrime; 
    } 
  
                
                
                
                
                
                
                
                
            }
      
      
         
         
     
      

       
       
       
        
        
        
        

