import java.util.*;
import java.io.*;
public class Main {
      static class pair implements Comparable<pair>{
        int a;
        int b;
        int c;
        public pair(int a, int b,int c){
            this.a=a;
            this.b=b;
            this.c=c;
        }
        public int compareTo(pair p){
            return a-p.a;
        }
          
      }
  public static void main(String[] args) throws IOException,InterruptedException{
	BufferedReader	 br = new BufferedReader(new InputStreamReader(System.in));
	PrintWriter out = new PrintWriter(System.out);
     	// String s = br.readLine();
        // char[] arr=s.toCharArray();
        // ArrayList<Integer> arrl = new ArrayList<Integer>(); 
        // TreeSet<Integer> ts1 = new TreeSet<Integer>(); 
        // HashSet<Integer> h = new HashSet<Integer>(); 
        // HashMap<Integer, Integer> map= new HashMap<>(); 
        // PriorityQueue<String> pQueue = new PriorityQueue<String>(); 
        // LinkedList<String> object = new LinkedList<String>(); 
        // StringBuilder str = new StringBuilder(); 
        //*******************************************************//
 	   //  StringTokenizer   st = new StringTokenizer(br.readLine());
 	   // 	  int t = Integer.parseInt(st.nextToken());
 	   //    while(t-->0){
 	   //        st = new StringTokenizer(br.readLine());
 	   // 	  int n = Integer.parseInt(st.nextToken());
 	   // 	  int[] arr = new int[n];
 	   // 	  st = new StringTokenizer(br.readLine());
 	   // 	  for(int i=0; i<n; i++){
 	   // 	      arr[i] =Integer.parseInt(st.nextToken());
 	   // 	  }
 	   // 	  int ans =0;
 	   // 	  out.println(ans);
 	   //    }
 	       StringTokenizer   st = new StringTokenizer(br.readLine());
 	    	  long t = Long.parseLong(st.nextToken());
 	    	  long min =10000000;
 	    	  long max =0;
 	          for(long i=1; i<=Math.sqrt(t);i++ ){
 	              if(t%i==0&&lcm(i,t/i)==t){
 	                  max = Math.max(i,t/i);
 	                  min = Math.min(min,max);
 	              }
 	          }
 	         out.println(min+" "+ t/min);
 	   	  out.flush();
	}
	static long gcd(long a, long b) 
    { 
    if (a == 0) 
        return b;  
    return gcd(b % a, a);  
    } 
      
    // method to return LCM of two numbers 
    static long lcm(long a, long b) 
    { 
        return (a*b)/gcd(a, b); 
    } 
}