
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));

            PriorityQueue<Pair> minPair = new PriorityQueue<>();

            for (int i = 0; i < factors.size(); i++) {
                for (int j = i+1; j < factors.size(); j++) {
                    long x = factors.get(i);
                    long y = factors.get(j);

                    if (getLCM(x, y) == n) {
                        minPair.add(new Pair(x, y));
                    }
                }
            }

            writer.println(minPair.poll());
        }
    }

    /**
     * @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;
    }

    static Long getLCM(long a, long b) {

        long product = a;
        product *= b;

        while (b > 0) {
            long c = a;
            a = b;
            b = c % b;
        }

        return product / a;
    }
}

class Pair implements Comparable<Pair> {

    long x, y, max;

    public Pair(long i, long j) {
        x = i;
        y = j;
        max = Math.max(x, y);
    }

    @Override
    public int compareTo(Pair o) {
        return (int) (this.max - o.max);
    }

    public String toString() {
        return x + " " + y;
    }
}
