import java.util.*;
 
public class Main
{   
    public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long x = scan.nextInt();
		
		long a = 1;
		for(long i=2; i<=x/2;i++){
		    if(x%i == 0){
		        a = i;
		    }
		}
		long b = x/a;
		System.out.println(a +" "+ b);
		
	}
}