import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double x = sc.nextDouble();
        double gen = Math.sqrt(x);
        int a = (int) gen;
        while (x>=1) {
            if (x % a == 0) {
                int b = (int) (x / a);
                if (gcd(a, b) == 1) {
                    System.out.println(a + " " + b);
                    break;
                }
            }
            a--;
        }
    }
    public static int gcd(int a, int b) {
        if (a % b == 0) {
            return b;
        } else {
            return gcd(b, a % b);
        }
    }
}

 			   				 		   			 	   	  	 	