import java.util.*;
public class Round613_C {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int num = scan.nextInt();
		Map<Integer, Integer> map = new HashMap<>();
		int div = Integer.MAX_VALUE;
		
		for(int i = 1; i <= num; i ++) {
			if(num % i == 0 ) {
				if(i >= div)
					break;
				
				div = num / i;
				if(div == i && num != 1)
					break;
				map.put(i, div);
			}
		}
		
		Set<Integer> set = map.keySet();
		Iterator<Integer> it = set.iterator();
		int min = Integer.MAX_VALUE;
		int key = 0, value = 0;
		while(it.hasNext()) {
			int tempkey = it.next();
			int tempvalue = map.get(tempkey);
			int add = tempkey + tempvalue;
			int tempmin = Math.min(min, add);
			System.out.println(tempmin);
			if(min > tempmin) {
				min = tempmin;
				key = tempkey;
				value = tempvalue;
			}
		}
		
		System.out.println(key + " " + value);
		
	}
}
