import java.util.*;

public class B {

    static long gcd(long a, long b) {
        if (a == 0)
            return b;

        return gcd(b % a, a);
    }

    static long lcm(long a, long b) {
        return (a / gcd(a, b)) * b;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        StringBuilder sb = new StringBuilder();

        long n = sc.nextLong();

        ArrayList<Long> al = new ArrayList<>();

        long factor = 1;

        while (n % 2 == 0) {
            n = n / 2;
            factor = factor * 2;
        }

        if (factor != 1) {
            al.add(factor);
        }

        for (int i = 3; i < Math.sqrt(n); i = i + 2) {
            factor = 1;
            while (n % i == 0) {
                n = n / i;
                factor = factor * i;
            }
            if (factor != 1) {
                al.add(factor);
            }
        }

        if (n > 2) {
            al.add(n);
        }

        if (al.size() == 1) {
            System.out.println(1 + " " + al.get(0));
            return;
        }

        long first1 = 1;
        long second1 = 1;

        long first2 = 1;
        long second2 = 1;

        for (int i = 0; i < al.size(); i++) {
            if (i < al.size() / 2) {
                first1 = first1 * al.get(i);
            } else {
                second1 = second1 * al.get(i);
            }

            if (i <= al.size() / 2) {
                first2 = first2 * al.get(i);
            } else {
                second2 = second2 * al.get(i);
            }
        }

        long max1 = Math.max(first1, second1);
        long max2 = Math.max(first2, second2);

        if (max1 < max2) {
            sb.append(first1 + " " + second1).append("\n");
        } else {
            sb.append(first2 + " " + second2).append("\n");
        }

        System.out.print(sb);
    }
}
