

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

public class FADI_AND_LCM {

	public static void main(String[] args) {

		Scanner nik = new Scanner(System.in);
		long x = nik.nextLong();

		// for (long x = 20; x <= 30; x++) {
		ArrayList<Long> a1 = new ArrayList<>();
		a1.add(1L);
		for (long i = 2; i * i <= x; i++) {
			if (x % i == 0 && (x / i) % i != 0) {
				a1.add(i);
			}
		}
		// System.out.println(a1);
		long temp = a1.get(a1.size() - 1);

		System.out.println(temp + " " + (x / temp));
	}
	// }
}
