import java.math.BigInteger;

import java.util.*;

public class test {

	private static final Scanner sc = new Scanner(System.in);
	static long __gcd(long a, long b)  
    {  
        // Everything divides 0  
        if (a == 0)  
        return b;  
        if (b == 0)  
        return a;  
          
        // base case  
        if (a == b)  
            return a;  
          
        // a is greater  
        if (a > b)  
            return __gcd(a - b, b);  
        return __gcd(a, b - a);  
    } 
	public static void main(String[] args) {
		long x = sc.nextLong();
		if(x==(long)1)
		{
			System.out.println(1+" "+1);
		}
		else
		{
			long sqr = (long) Math.sqrt(x);
			long i = 1;
			long min=Long.MAX_VALUE;
			for (; i <= sqr; i++) {
				if (x % i == 0) {
					if (x / i != i){
						BigInteger a1=new BigInteger(Long.toString(i));
						BigInteger a2=new BigInteger(Long.toString(x/i));
						long gc=a1.gcd(a2).longValue();
					if(gc==1)
					{
						break;
					}
					else
					{
						min=Long.min(gc, min);
					}
						}
				}
			}
			System.out.println(i+" "+x/i);
			
		}
		
	}

}