import com.sun.org.apache.xerces.internal.parsers.IntegratedParserConfiguration;

import java.io.*;
import java.util.*;
public class CF613C {
    static ArrayList<Long> PRIME;
    static long answer = Long.MAX_VALUE;;
    public static void main(String args[]) throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        long n = Long.parseLong(br.readLine());
        if (n == 1) {
            System.out.println("1 1");
        }
        else {
            findPrimes();
            ArrayList<Long> primeFactors = findPrimeFactorization(n);
            HashMap<Long, Long> hash = new HashMap<Long,Long>();
            ArrayList<Long> uniquePrimeFactors = new ArrayList<Long>();
//            long N = n;
            for(Long primeFactor: primeFactors){
                if(hash.containsKey(primeFactor)){
//                    N = N/primeFactor;
                    hash.put(primeFactor, hash.get(primeFactor)+1);
                }else {
                    hash.put(primeFactor, 1L);
                }
            }
            for(Long factor: hash.keySet()) {
                uniquePrimeFactors.add((long)(Math.pow(factor,(hash.get(factor)))));
            }

            findMax(uniquePrimeFactors, 1, 0, n);
//            for(Long factor: hash.keySet()) {
//                if(answer%factor == 0 && hash.get(factor) > 1) {
//                    answer *= (long) (Math.pow(factor,(hash.get(factor)-1)));
//                }
//            }
            System.out.println(Math.min(answer, n/answer)+ " " + Math.max(answer, n/answer));
        }
    }

    public static void findMax(ArrayList<Long> a, long currentValue, int index, long N) {
//        if(currentValue != 1)
//        System.out.println(currentValue);
        if(index == a.size()){
//            answer = a.get(index);
            return;
        }
        for(int i = index ; i < a.size() ; i++) {
            if(answer > Math.max(currentValue, N/currentValue))
                answer = Math.max(currentValue, N/currentValue);
            for(int j = i + 1 ; j < a.size() ; j++) {
                findMax(a, 1, j, N);
                findMax(a, currentValue*a.get(i), j, N);
                findMax(a, currentValue, j, N);
            }
        }
    }



    public static ArrayList<Long> findPrimeFactorization(long n) {
        ArrayList<Long> primeFactors = new ArrayList<Long>();
        for(Long prime:PRIME) {
            while(n%prime == 0) {
                n /= prime;
                primeFactors.add(prime);
            }
            if(n == 1) break;
        }
        if(n!=1)
            primeFactors.add(n);
        return primeFactors;
    }

    public static void findPrimes()
    {
        PRIME = new ArrayList<Long>();
        int n = 2000000;
        int p[] = new int[n];
        p[0] = 1;
        p[1] = 1;
        for(int i = 2 ; i < n ; i++) {
            if(p[i] == 0){
                PRIME.add(Long.valueOf(i));
                int j = 2;
                while(i*j < n){
                    p[i*j] = 1;
                    j++;
                }
            }
        }
    }
}
