

import java.util.Scanner;

public class FadiLCM {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        long x=sc.nextLong();
        long d=0,pos=0;
        for (long i = 1; i < x; i++) {
            if(x%i==0){
                d=x/i;
                pos=i;
                break;
            }
        }
        System.out.println(d+" "+pos);
    }
}
