import java.util.ArrayList; import java.util.Scanner; class Main { static Scanner in = new Scanner(System.in); public static void main(String[] args) { long n = in.nextLong(); boolean[] pr = new boolean[(int)Math.sqrt(n) + 1]; ArrayList list = new ArrayList<>(); for(int i = 2; i < pr.length; i++){ if(pr[i]) continue; for(int j = 2 * i; j < pr.length; j += i){ pr[i] = true; } list.add(i); } for(int i : list){ if(n % i == 0){ System.out.println(i + " " + n / i); return; } } System.out.println("1 " + n); } }