import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
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;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            long X = in.nextLong();
            ArrayList<Integer> primes = new ArrayList<>();
            MathUtils.getPrimes(primes, (int) (1e6) + 1);
            ArrayList<Long> values = new ArrayList<>();
            long originalX = X;
            for (int i = 0; primes.size() > i && primes.get(i) <= Math.sqrt(X); i++) {
                long cur = 1;
                while (X % primes.get(i) == 0) {
                    cur *= primes.get(i);
                    X /= primes.get(i);
                }
                if (cur > 1) {
                    values.add(cur);
                }
            }
            if (X > 1) {
                values.add(X);
            }
            long res = originalX;
            for (int mask = 0; mask < (1 << values.size()); mask++) {
                long curval = 1;
                for (int bit = 0; bit < values.size(); bit++) {
                    if ((mask & (1 << bit)) > 0) {
                        curval *= values.get(bit);
                    }
                }
                res = Math.min(res, Math.max(curval, originalX / curval));
            }
            out.println(originalX / res + " " + res);
        }

    }

    static class MathUtils {
        public static void getPrimes(ArrayList<Integer> primes, int N) {
            //get all primes less than or equal to N, (O(n)
            boolean[] sieve = new boolean[N + 1];
            for (int i = 2; i <= N; i++) {
                if (!sieve[i]) {
                    primes.add(i);
                }
                for (int j = 0; j < primes.size() && primes.get(j) * i <= N; j++) {
                    sieve[primes.get(j) * i] = true;
                    if (i % primes.get(j) == 0) {
                        break;
                    }
                }
            }
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

    }
}

