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

/*
Прокрастинирую
*/

public class Main {

    static FastReader in;
    static PrintWriter out;
    static Random rand = new Random();
    static final int INF = (int) (1e9);
    static final int MOD = (int) (1e9 + 7);
    static final int N = (int) (5e5 + 5);

    static void solve() {
        long x = in.nextLong();

        ArrayList<Long> a = new ArrayList<>();
        long xx = x;
        for (long i = 2; i * i <= xx; i++) {
            if (xx % i == 0) {
                long ii = 1;
                while (xx % i == 0) {
                    ii *= i;
                    xx /= i;
                }
                a.add(ii);
            }
        }
        if (xx > 1) {
            a.add(xx);
        }

        long n = 1 << a.size();
        long ans1 = 1, ans2 = x;
        for (long i = 0; i < n; i++) {
            long a1 = 1, a2 = 1;
            for (int j = 0; j < a.size(); j++) {
                if ((i & (1 << j)) != 0) {
                    a1 *= a.get(j);
                } else {
                    a2 *= a.get(j);
                }
            }
            if (Math.max(a1, a2) < Math.max(ans1, ans2)) {
                ans1 = Math.min(a1, a2);
                ans2 = Math.max(a1, a2);
            }
        }

        out.println(ans1 + " " + ans2);
    }

    public static void main(String[] args) throws FileNotFoundException {
        in = new FastReader(System.in);
//        in = new FastReader(new FileInputStream("input.txt"));
        out = new PrintWriter(System.out);
//        out = new PrintWriter(new FileOutputStream("output.txt"));


        int q = 1;

        while (q-- > 0) {
            solve();
        }

        out.close();
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        FastReader(InputStream is) {
            br = new BufferedReader(new InputStreamReader(is));
        }

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

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

        Double nextDouble() {
            return Double.parseDouble(next());
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                st = new StringTokenizer(nextLine());
            }
            return st.nextToken();
        }

        String nextLine() {
            String s = "";
            try {
                s = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return s;
        }
    }
}