import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.io.IOException;
import java.util.Collections;

public class C {
	public static long gcd(long a, long b) {
		if(a == 0)
			return b;
		else
			return gcd(b%a, a);
	}
	
	public static long lcm(long a, long b) {
		long lcm = 0 ;
		lcm = (a*b)/gcd(a,b);
		return lcm;
	}
	
	public static void main(String[] args)  throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		//int T = Integer.parseInt(br.readLine());
		//for(int tt = 0; tt < T ; tt++) {
			long n = Long.parseLong(br.readLine());
			ArrayList<Long> al = new ArrayList<Long>();
			for(long i = 1 ; i < Math.sqrt(n) ; i++) {
				if(n % i ==0) {
					if(n/i == i)
						al.add(i);
					else {
						al.add(i);
						al.add(n/i);
					}
				}
			}
			Collections.sort(al);
			for(int i = 0 ; i  < al.size() -1 ; i++) {
				if(lcm(al.get(i), al.get(i+1)) == n) {
					System.out.println(al.get(i) + " " + al.get(i+1));
					break;
				}
			}
			
		//}

	}

}
