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

public class FadiAndLcm {
    static PrintWriter out;

    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        out = new PrintWriter(System.out);

        long n = sc.nextLong();
        LinkedList<Long> factors = factorize(n);
        if(factors.size()==1) {
            out.println("1 "+n);
        } else {
            long a = 1;
            long b = 1;
            boolean fromBeginning = true;
            while(factors.size()>1) {
                if(fromBeginning) {
                    a *= factors.remove();
                    b *= factors.remove();
                } else {
                    a *= factors.removeLast();
                    b *= factors.removeLast();
                }
                fromBeginning = !fromBeginning;
            }
            if(a>b) {
                long tmp = a;
                a = b;
                b = tmp;
            }
            if(!factors.isEmpty()) a *= factors.remove();
            out.print(a+" "+b);
        }

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

    static LinkedList<Long> factorize(long n) {
        LinkedList<Long> result = new LinkedList<>();
        while (n > 1) {
            long divisor = findDivisor(n);
            long factor = 1;
            while (n % divisor == 0) {
                factor*=divisor;
                n/=divisor;
            }
            result.add(factor);
        }
        result.sort(Long::compare);
        return result;
    }

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