import java.util.*;
import java.math.*;
import java.io.*;

// Arrays.sort();
//char[] a=fs.next().toCharArray();

public class C_Fadi_and_LCM {
    public static void main(String[] args) {
        FastScanner fs = new FastScanner();
        PrintWriter out = new PrintWriter(System.out);
        long x = fs.nextLong();
        long ans = 1;
        for (long i = 1; i * i < x; i++) {

            if (x % i == 0 && lcm(i, x / i) == x) {
                ans = i;
            }
        }
        out.println(ans + " " + x / ans);

        out.close();
    }

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

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

    static void sort(int[] a) {
        ArrayList<Integer> l = new ArrayList<>();
        for (int i : a)
            l.add(i);
        Collections.sort(l);
        for (int i = 0; i < a.length; i++)
            a[i] = l.get(i);
    }

    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        StringBuilder nextsb() {
            StringBuilder sb = new StringBuilder(next());
            return sb;
        }

        String next() {
            while (!st.hasMoreTokens())
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                }
            return st.nextToken();
        }

        int[] readArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    }
}
