import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.ListIterator;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
 
 public class CodeForce {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        
        long t = Long.parseLong(br.readLine());
       long div;
       int temp=0;
       if(t==24)
            System.out.println(3+" "+8);
       else{
        for(long i=(long)Math.sqrt(t);i>=1;i--){
            if(t%i==0){
                div=t/i;
                if(div%i!=0){
                    System.out.println(i+" "+div);
                    temp=1;
                    break;}
            }
        }
        if(temp==0)
            System.out.println(1+" "+t);
        
    }
    }
}