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

public class Solution{
	
	public Solution(){
		Scanner sc = new Scanner(System.in);
		int tests = 1;
        
        for(int t=1; t<=tests; t++){
			long x = sc.nextLong();
			
			long a = 1L;
			long b = x;
			
			long i = 2L;
			while((i*i) < x){
				if(x%i == 0){
					a = i;
					b = x/i;
				}
				i++;
			}
			
			System.out.println(a + " " + b);
        }
	}
	
	public static void main(String[] args){
		new Solution();
	}
}