import java.util.Scanner;

public class P3 {
    private static int lcm (int a, int b) {
        int max, step, lcm = 0;
        if(a > b){
            max = step = a;
        }
        else{
            max = step = b;
        }

        while(a != 0) {
            if(max % a == 0 && max % b == 0) {
                lcm = max;
                break;
            }
            max += step;
        }
        return lcm;
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int x = scanner.nextInt();
        int f1 = x + 1, f2 = x + 1;
//        for (int i = 1; i <= x ; i++) {
//            for (int j = i; j <= x ; j++) {
//                if (lcm(i, j) == x && Math.max(i, j) < Math.max(f1, f2)) {
//                    f1 = i;
//                    f2 = j;
//                }
//            }
//        }

        for (int i = 1; i <= x ; i++) {
            if (x % i == 0 && Math.max(i, x / i) < Math.max(f1, f2) && ((i % (x / i) != 0) && (x / i % i != 0) || i == 1)) {
                f1 = i;
                f2 = x / i;
            }
        }
        System.out.println(f1 + " " + f2);
    }
}
