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

public class Main
{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	      	int n = sc.nextInt();
	      	
	      	int a=0,b=0;
	      	int ans = Integer.MAX_VALUE;
	      	for(int i=1;i<=Math.sqrt(n);i++){
	      	    if(n%i==0){
	      	        if(n/i==i){
	      	            if(i+i<=ans){
	      	                a=i;b=i;
	      	            }
	      	        }
	      	        else{
	      	            int val = i + (n/i);
	      	            if(val<ans){
	      	                a=i;b=n/i;
	      	            }
	      	        }
	      	        
	      	    }
	      	        
	      	}
	      	System.out.println(a+" "+b);
	      
	}
}