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

public class Codeforces {

    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        long x = in.nextLong();
        long sqrt = (long) Math.sqrt(x) + 1;

        Map<Long, Long> factorToPower = new HashMap<>();
        List<Long> factors = new ArrayList<>();
        for (int i = 2; i <= sqrt; i++) {
            long pow = 1;
            while (x % i == 0) {
                x /= i;
                pow *= i;
            }

            if (pow > 1) {
                factorToPower.put((long) i, pow);
                factors.add((long) i);
            }
        }

        if (x != 1) {
            factorToPower.put(x, x);
            factors.add(x);
        }

        int mask = 1 << factors.size();
        long resA = Long.MAX_VALUE;
        long resB = Long.MAX_VALUE;

        for (int i = 0; i < mask; i++) {
            long a = 1;
            long b = 1;
            for (int j = 0; j < factors.size(); j++) {
                long fact = factors.get(j);
                long pow = factorToPower.get(fact);

                if ((i & (1 << j)) > 0) {
                    a *= pow;
                } else {
                    b *= pow;
                }
            }

            if (Math.max(a, b) < Math.max(resA, resB)) {
                resA = a;
                resB = b;
            }
        }

        out.println(resA + " " + resB);
        out.close();
    }

    private static void print2Arr(int[][] arr, PrintWriter out) {
        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < arr[0].length; j++) {
                out.print(arr[i][j] + " ");
            }
            out.println();
        }
    }


    private static void printArr(int[] arr, PrintWriter out) {
        for (int i = 0; i < arr.length; i++) {
            out.print(arr[i] + " ");
        }
        out.println();
    }

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

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            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 String nextLine() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }

            return null;
        }

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

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

        public int[] nextIntArr(int n) {
            int[] arr = new int[n];
            for (int j = 0; j < arr.length; j++) {
                arr[j] = nextInt();
            }

            return arr;
        }

        public long[] nextLongArr(int n) {
            long[] arr = new long[n];
            for (int j = 0; j < arr.length; j++) {
                arr[j] = nextLong();
            }

            return arr;
        }
    }
}