//package com.company;

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

public class Main {

    public static void main(String[] args) throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
//        br = new BufferedReader(new FileReader(new File("input.txt")));
//        out = new PrintWriter(new File("output.txt"));
        long x = nextLong();
        int k = (int) (Math.sqrt(x));
        for (int i = k; i >= 1; i--) {
            long a = i;
            long b = x/i;
            if(gcd(a, b) == 1){
                out.println(a + " " + b);
                out.close();
                return;
            }

        }

    }

    static BufferedReader br;
    static PrintWriter out;
    static StringTokenizer in = new StringTokenizer("");

    static String next() throws IOException {
        while (!in.hasMoreTokens()) {
            in = new StringTokenizer(br.readLine());
        }
        return in.nextToken();
    }

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

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

    static Double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }

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