/*package whatever //do not write package name here */

import java.io.*;
import java.util.*;
public class S {
	public static void main (String[] args) {
		Scanner in=new Scanner(System.in);
		long x=in.nextLong();
		ArrayList<Long> al=divisors(x);
		long min=Long.MAX_VALUE,l=1,r=x;
		for(int i=0;i<al.size();i++)
		{
		    long z=Math.max(al.get(i),(x/al.get(i)));
		    if(min>z && z%Math.min(al.get(i),(x/al.get(i)))!=0)
		    {
		        min=z;
		        l=al.get(i);
		        r=x/al.get(i);
		    }
		}
		System.out.println(l+" "+r);
	}
	public static ArrayList<Long> divisors(long x)
	{
	    ArrayList<Long> al=new ArrayList<>();
	    for(long i=1;i*i<=x;i++)
	    {
	        if(x%i==0)
	        {
	            if((x/i)==i)
	            {
	                al.add(i);
	            }
	            else 
	            {
	                al.add(i);
	                al.add(x/i);
	            }
	            
	        }
	    }
	    return al;
	}
}