
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        HashMap<Long, Long> map = new HashMap<>();
        primeFactors(n, map);
        if (map.size() == 1 || map.size() == 0) {
            System.out.println(n + " " + 1);
        } else {
            List<Long> factors = new ArrayList<>();
            for (Map.Entry<Long , Long> entry : map.entrySet()) {
                factors.add((long) Math.pow(entry.getKey(), entry.getValue()));
            }
            Collections.sort(factors);
            long a = factors.get(0);
            long b = factors.get(factors.size()-1);
            for (int i = 1; i < factors.size()-1; i++) {
                if (a < b) {
                    a*=factors.get(i);
                } else {
                    b*=factors.get(i);
                }
            }
            System.out.println(a + " " + b);
        }
    }

    public static void primeFactors(long n, HashMap<Long, Long> map) {
        while (n % 2 == 0) {
            map.putIfAbsent((long)2, (long)0);
            map.put((long)2, map.get((long)2) + 1);
            n /= 2;
        }

        for (int i = 3; i <= Math.sqrt(n); i += 2) {
            while (n % i == 0) {
                map.putIfAbsent((long)i, (long)0);
                map.put((long)i, map.get((long)i)+1);
                n /= i;
            }
        }

        if (n > 2)
            map.putIfAbsent(n, (long)1);
    }
}
