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

public class Sol{
 public static void factor(long n,Map<Long,Long> map){
 
    while(n%2==0){
       if(!map.containsKey(2L)){
        map.put(2L,1L);
       }else{
         map.put(2L,map.get(2L)+1L);
       }
       n=n/2;
    }
    for(long i=3;i*i<n;i+=2){
      while(n%i==0){
         n=n/i;
        if(!map.containsKey(i)){
        map.put(i,1L);
       }else{
         map.put(i,map.get(i)+1L);
       }
      }
    }
    if(n>2){
       if(!map.containsKey((long)n)){
        map.put(n,1L);
       }else{
         map.put(n,map.get((long)n)+1L);
       }
    }
 }
  public static void main(String [] args) throws IOException{
     BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
     long n=Long.parseLong(br.readLine().trim());
     Map<Long,Long> map=new HashMap<>();
     factor(n,map);
     List<Long> list=new ArrayList<>();
     for(Map.Entry<Long,Long> entry : map.entrySet()){
       long key=entry.getKey();
       long value=entry.getValue();
       long prod=1L;
       while(value-->0){
         prod=prod*key;
       }
       list.add(prod);
     }
     Collections.sort(list);
     if(list.size()==1){
       System.out.println(1+" "+list.get(0));
     }
     else{
       if(list.size()==2){
          System.out.println(list.get(0)+" "+list.get(1));
       }else{
        int i=0,j=list.size()-1;
        long p1=1,p2=1;
        while(i<j){
           p1=p1*list.get(i);
           p2=p2*list.get(j);
           i++;j--;
        }
        if(list.size()%2!=0){
           if(p1>p2){
             p2=p2*list.get(i);
           }else{
             p1=p1*list.get(i);
           }
        }
        System.out.println(Math.min(p1,p2)+" "+Math.max(p1,p2));
       }
     }
    
    }
  }