import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class FadiAndLCM {

	public static ArrayList<Long> factors = new ArrayList<Long>();

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		long x = in.nextLong();
		in.close();
		if (x == 1) {
			System.out.println(1);
			System.exit(0);
		}
		getFactors(x);
		long max = -1;
		long a = -1;
		long b = -1;
	//	printIt();
		for (int i=0;i<factors.size() - 1;i++) {
			for (int j=i;j<factors.size();j++) {
				if (lcm(factors.get(i), factors.get(j)) == x) {
					if (max == -1) {
						max = Math.max(factors.get(j), factors.get(j));
						a = factors.get(i);
						b = factors.get(j);
					}else {
						long temp = Math.max(factors.get(j), factors.get(j));
						if (temp < max) {
							max = Math.max(factors.get(j), factors.get(j));
							a = factors.get(i);
							b = factors.get(j);
						}
					}
					
				}
			}
		}
		
		System.out.println(a + " " + b);

	}

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

	public static long lcm(long a, long b) {
		return (a * b) / gcd(a, b);
	}

	public static void getFactors(long n) {
		for (long i = 1; i <= Math.sqrt(n); i++) {
			if (n % i == 0) {
				factors.add(i);
			}
		}
		int size = factors.size();
		for (int i=size - 1;i>=0;i--) {
			if (n / factors.get(i) != factors.get(i))
			factors.add(n / factors.get(i));
		}
		
	}
	
	public static void printIt() {
		for (int i=0;i<factors.size();i++)
			System.out.print(factors.get(i) + " ");
	}

}
