import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long m = sc.nextLong();
    long ans = 0;
    for(long i = 2; (i * i) <= m; i++) {
      if((m % i) == 0) {
        ans = i;
        break;
      }
    }
    if(ans == 0) ans = 1;
    System.out.println(ans + " " + m / ans);
  }
}