import java.util.*;
import java.lang.*;
public class Main
{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		if(n==1) System.out.println(1 +" "+ 1);
		else{
		int max = 0;
        for(int i=1;i*i<n;i++){
            if(n%i==0&&(n/i)%i!=0){
                max = Math.max(max,i);
            }
        }
        if(max==0) System.out.println(n+" "+ 1);
        else 
        System.out.println(max+" "+n/max);
	}
	}
   static int gcd(int a,int b){
	    if(b==0) return a;
	    else return gcd(b,a%b);
	}
}
