import java.io.*;
import java.lang.reflect.Array;
import java.security.acl.LastOwnerException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.stream.Collectors;


public class Main {
    static Long max = (long) (2 * 10E5);
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

    // Arrays.stream(br.readLine().split("\\s+")).map(Integer::parseInt).toArray(Integer[]::new);
    // Arrays.stream(br.readLine().split("\\s+")).map(Long::parseLong).toArray(Long[]::new);
    // Integer.parseInt(br.readLine());
    // Long.parseLong(br.readLine());

    static long gcd(long a, long b) {
        if (b == 0)
            return a;
        else return gcd(b, a % b);
    }

    static long lcm(long a, long b) {
        return a / gcd(a, b) * b;
    }

    public static void main(String[] args) throws IOException {
//        int t = Integer.parseInt(br.readLine());
//        for (int _t = 0; _t < t; _t++) {
        long x = Long.parseLong(br.readLine());
        long min = Integer.MAX_VALUE, mina = -1, minb = -1;
        for (int a = 1; a <= Math.sqrt(x) + 1; a++) {
            if (x % a == 0 && lcm(a, x/a) == x){
                if (Math.max(a, x/a) < min){
                    min = Math.max(a, x/a);
                    mina = a;
                    minb = x/a;
                }
            }
        }
        System.out.println(mina + " " + minb);

//        }
    }
}