import java.math.BigInteger;
import java.util.*;

public class C {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long n = in.nextLong();
        boolean[] primes = sieve(n);
        int max = 1;
        for (int i = 2; i < primes.length; i++) {
            if (primes[i]) {
                if (n % i == 0 && i * i != n) {
                    max = i;
                }
            }
        }
        long antiMax = n / max;
        System.out.println(max + " " + antiMax);
    }

    public static BigInteger lcm(BigInteger bigInt1, BigInteger bigInt2) {
        BigInteger mul = bigInt1.multiply(bigInt2);
        BigInteger gcd = bigInt1.gcd(bigInt2);
        BigInteger lcm = mul.divide(gcd);
        return lcm;
    }

    public static boolean[] sieve(long n) {
        boolean[] primes = new boolean[((int) Math.sqrt(n)) + 1];
        Arrays.fill(primes, true);
        primes[0] = primes[1] = false;
        for (int i = 2; i < primes.length; i++) {
            if (primes[i]) {
                for (int j = 2; i * j < primes.length; j++) {
                    primes[i * j] = false;
                }
            }
        }
        return primes;
    }
}