
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;

public class FadiAndLcm {
    static PrintWriter out;
    static long[] factors;
    static long currMax = Long.MAX_VALUE;
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        out = new PrintWriter(System.out);

        long n = sc.nextLong();
        factors = factorize(n);
        if(factors.length==1) {
            out.println("1 "+n);
        } else {
            partition(1, 1, 0);

            out.print(currMax+" "+n/currMax);
        }

        sc.close();
        out.close();
    }

    private static void partition(long a, long b, int idx) {
        if(idx == factors.length) {
            long result = Math.max(a, b);
            currMax = Math.min(result, currMax);
            return;
        }
        if(a>=currMax||b>=currMax) return;
        partition(a * factors[idx], b,idx + 1);
        partition(a , b* factors[idx],idx + 1);
    }

    static long[] factorize(long n) {
        List<Long> result = new ArrayList<>();
        while (n > 1) {
            long divisor = findDivisor(n);
            long factor = 1;
            while (n % divisor == 0) {
                factor*=divisor;
                n/=divisor;
            }
            result.add(factor);
        }
        result.sort((a, b) -> -Long.compare(a, b));
        return result.stream().mapToLong(Long::longValue).toArray();
    }

    static long findDivisor(long n) {
        for (long i = 2; i <= (long) Math.sqrt(n); i++) {
            if(n%i==0) return i;
        }
        return n;
    }
}
