import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        inputClass in = new inputClass(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CFadiAndLCM solver = new CFadiAndLCM();
        solver.solve(1, in, out);
        out.close();
    }

    static class CFadiAndLCM {
        static long pow(long x, long y, long p) {
            long res = 1;
            x = x % p;

            while (y > 0) {
                if ((y & 1) == 1)
                    res = (res * x) % p;
                y = y >> 1;
                x = (x * x) % p;
            }
            return res;
        }

        public void solve(int testNumber, inputClass sc, PrintWriter out) {
            long x = sc.nextLong();
            long u = x;
            if (x == 1) {
                out.println(1 + " " + 1);
                return;
            }
            ArrayList<CFadiAndLCM.Pair> divs = new ArrayList<>();
            for (long i = 2; i * i <= x; i++) {
                if (x % i == 0) {
                    CFadiAndLCM.Pair p = new CFadiAndLCM.Pair(i, 0L);
                    while (x % i == 0) {
                        x /= i;
                        p.y++;
                    }
                    divs.add(p);
                }
            }
            if (x > 1) {
                divs.add(new CFadiAndLCM.Pair(x, 1));
            }
            if (divs.size() == 1) {
                out.println(1 + " " + u);
            } else {
                int dec = divs.size();
                long besta = Long.MAX_VALUE;
                long bestb = Long.MAX_VALUE;
                for (int i = 0; i < (1 << dec); i++) {
                    ArrayList<Integer> now = new ArrayList<>();
                    for (int j = 0; j < dec; j++) {
                        if ((i & (1 << j)) > 0) {
                            now.add(j);
                        }
                    }
                    long a = 1;
                    for (int j : now) {
                        a *= pow(divs.get(j).x, divs.get(j).y, (long) 1e18);
                    }
                    long b = u / a;
                    if (Math.max(a, b) < Math.max(besta, bestb)) {
                        besta = a;
                        bestb = b;
                    }
                }
                out.println(besta + " " + bestb);
            }

        }

        static class Pair {
            long x;
            long y;
            long z;

            public Pair() {
            }

            public Pair(long x, long y) {
                this.x = x;
                this.y = y;
                this.z = 0;
            }

            public boolean equals(Object o) {
                if (this == o) {
                    return true;
                }

                if (o == null || getClass() != o.getClass()) {
                    return false;
                }
                CFadiAndLCM.Pair pair = (CFadiAndLCM.Pair) o;
                return x == pair.x && y == pair.y && z == pair.z;
            }

            public int hashCode() {
                int result = Long.hashCode(x);
                result = 31 * result + Long.hashCode(y);
                result = 31 * result + Long.hashCode(z);
                return result;
            }

        }

    }

    static class inputClass {
        BufferedReader br;
        StringTokenizer st;

        public inputClass(InputStream in) {

            br = new BufferedReader(new InputStreamReader(in));
        }

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

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

    }
}

