//package codeforces.round613div2;

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

public class FadiLCM {
    private static int UNVISITED = 0;
    private static int VISITING = -1;
    private static int VISITED = 1;

    public static void main(String[] args) {
//        try {
//            FastScanner in = new FastScanner(new FileInputStream("src/input.in"));
//            PrintWriter out = new PrintWriter(new FileOutputStream("src/output.out"));

        FastScanner in = new FastScanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

            solve(1, in, out);

//        } catch (IOException e) {
//            e.printStackTrace();
//        }
    }

    private static void solve(int q, FastScanner in, PrintWriter out) {
        for (int qq = 0; qq < q; qq++) {
            long X = in.nextLong();
            if(X == 1) {
                out.println(1 + " " + 1);
            }
            else {
                long a = 1, b = X;
                for(long aa = 2; aa <= (long)Math.sqrt(X); aa++) {
                    if(X % aa != 0) {
                        continue;
                    }
                    long bb = X / aa;
                    if(aa * bb / gcd(aa, bb) == X && bb < b) {
                        a = aa;
                        b = bb;
                    }
                }
                out.println(a + " " + b);
            }
        }
        out.close();
    }

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

    private static long modularAdd(long a, long b, int mod) {
        long sum = a + b;
        if (sum >= mod) {
            sum -= mod;
        }
        return sum;
    }

    private static long modularSubtract(long a, long b, int mod) {
        long diff = a - b;
        if (diff < 0) {
            diff += mod;
        }
        return diff;
    }

    private static Stack<Integer> topologicalSort(Set<Integer>[] g) {
        Stack<Integer> stack = new Stack<>();
        int[] state = new int[g.length];

        for (int node = 0; node < g.length; node++) {
            if (!topoSortHelper(g, stack, state, node)) {
                return null;
            }
        }
        return stack;
    }

    private static boolean topoSortHelper(Set<Integer>[] g, Stack<Integer> stack, int[] state, int currNode) {
        if (state[currNode] == VISITED) {
            return true;
        } else if (state[currNode] == VISITING) {
            return false;
        }
        state[currNode] = VISITING;
        for (int neighbor : g[currNode]) {
            if (!topoSortHelper(g, stack, state, neighbor)) {
                return false;
            }
        }
        state[currNode] = VISITED;
        stack.push(currNode);
        return true;
    }

    static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStream stream) {
            try {
                br = new BufferedReader(new InputStreamReader(stream));
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

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

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

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

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

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


