import java.util.*;
public class Main {
    public static void main(String args[]) {
        Scanner s = new Scanner(System.in);
        long x = s.nextLong();
        ArrayList<Long> div = new ArrayList<>();

        Divisors(x, div);
        //Collections.sort(div);

        long mina = x, minb = 1;
        for(int i = 0 ; i < div.size()/2 ; i++){
            for(int j = div.size()/2 ; j < div.size() ; j++){
                long aa = Math.max(div.get(i), div.get(j));
                long bb = Math.min(div.get(i), div.get(j));
                if(lcm(aa, bb) == x && aa < mina){
                    mina = aa;
                    minb = bb;
                }
            }
        }

        System.out.println(mina+" "+minb);
    }
    static long lcm(long a, long b){
        return a*b/gcd(a,b);
    }

    static long gcd(long a, long b){
        return a == 0 ? b : gcd(b%a, a);
    }

    static void Divisors(long n, ArrayList<Long> div){

        long i = 1;

        while(i*i <= n){
            if(n%i == 0){
                if(n/i == i)
                div.add(i);
                else{
                    div.add(i);
                    div.add(n/i);
                }
            }
            i++;
        }
    }
}