import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.sql.SQLSyntaxErrorException;


public class Main {

    public static int findLCM(int a, int b){
        int lcm = (a > b) ? a : b;
        while(true){
            if (lcm % a == 0 && lcm % b == 0) {
                break;
            }
            lcm++;
        }
        return lcm;
    }
    public static void main (String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            long x = Long.parseLong(br.readLine());
            int count=0;
            if(x==1){
                System.out.println(1+" "+1);
            }else{
                if(x==2){
                    System.out.println(1+" "+2);
                }else{
                    int[] arr = new int[2];
                    for(int i=2;i<x/2;i++){
                        if(x%i==0){
                            arr[count]=i;
                            count++;
                        }
                        if(count>1){
                            break;
                        }
                    }
                    System.out.println(arr[0]+" "+arr[1]);
                }
            }

    }
}
