import java.util.Scanner;

public class Main {

    static int gcd(int a, int b) {
        if (b == 0)
            return Math.abs(a);
        return gcd(b, a % b);
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        for (int i = (int) Math.round(Math.sqrt(n)); i >= 1; i--) {
            if ((n % i == 0) && gcd(i, (int) (n/i)) == 1) {
                System.out.println(i+" "+n/i);
                break;
            }
        }
    }
}