import java.util.*;
import java.lang.*;
public class Main
{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		int c=0;
		for(int i=0;i<40;i++){
		    if(n==(long)Math.pow(2,i)){c++;break;}
		}
		if(c>0) System.out.println(n+" "+ 1);
		else{
		    for(int i=2;i*i<n;i++){
		        if(n%1==0){
		            int e=0;
		            if(i%2==0) e++;
		            if((n/i)%2==0) e++;
		            if(e==1){
		                System.out.println(i+" "+n/i);
		                break;
		            }
		        }
		    }
		}
	}
}
