
import java.io.*;
import java.util.*;
import java.math.*;

/**
 * @author shriman_chetan
 * @name chetan raikwar
 * @date 10/01/2020
 */
public class Solution {

    public static void main(String[] args) throws IOException {

        try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
                PrintWriter writer = new PrintWriter(new OutputStreamWriter(System.out))) {

            long n = Long.parseLong(reader.readLine());

            // if 1
            if (n == 1) {
                writer.println("1 1");
                return;
            }

            // if prime
            if (BigInteger.valueOf(n).isProbablePrime(10)) {
                writer.println(1 + " " + n);
                return;
            }

            ArrayList<Long> factors = new ArrayList<>(getFactors(n));

            long x = 1, y = 1;
            boolean found = false;

            for (int i = 1; i < factors.size() - 2; i++) {

                x = factors.get(i);

                for (int j = i + 1; j < factors.size() - 1; j++) {

                    y = factors.get(j);

                    if (x * y == n) {
                        found = true;
                        break;
                    }
                }

                if (found) {
                    break;
                }
            }

            if (found) {
                writer.println(x + " " + y);
            } else {
                writer.println(1 + " " + n);
            }
        }
    }

    /**
     * @return prime factors of number
     */
    static TreeSet<Long> getFactors(long n) {

        TreeSet<Long> factors = new TreeSet<>();

        for (long i = 1; i <= Math.sqrt(n); i++) {
            if (n % i == 0) {
                factors.add(i);
                factors.add(n / i);
            }
        }
        return factors;
    }
}
