// No sorceries shall previal. //         
import java.io.PrintWriter;
import java.util.*;
     
public class _InVoker_ {
    	
    public static void sort(long arr[], int start, int end) { 		
		if(start>=end)
			return;		
		int mid=(start+end)/2;
		sort(arr,start,mid);
		sort(arr,mid+1,end);
		merge(arr,start,mid,end);	
	}	
	private static void merge(long arr[], int start, int mid, int end) {		
		int i, j=mid+1,c=0;
		long temp[]= new long[end-start+1];
		for(i=start;i<=mid && j<=end;c++) {
			if(arr[i]<=arr[j]) {
				temp[c]=arr[i];
				i++;
			}
			else {
				temp[c]=arr[j];
				j++;
			}
		}
		while(i<=mid) {
			temp[c]=arr[i];
			i++;c++;
		}
		while(j<=end) {
			temp[c]=arr[j];
			j++;c++;
		}
		c=0;
		for(i=start;i<=end;i++,c++)
			arr[i]=temp[c];
	}
	static class ListNode {		
		ListNode(){
			data=0;
			next=null;
		}		
		ListNode(int data){			
			this.data=data;			
		}		
		ListNode(char a){			
			this.a=a;		
		}		
		private char a;
		private int data;
		private ListNode next;
		
		public char getCharData() {
			return a;
		}
		public void setCharData(char x) {
			a=x;
		}
		public int getData() {
			return data;
		}
		public void setData(int data) {
			this.data = data;
		}
		public ListNode getNext() {
			return next;
		}
		public void setNext(ListNode next) {
			this.next = next;
		}
	}
	static long gcd(long a, long b) 
    { 
      if (b == 0) 
        return a; 
      return gcd(b, a % b);  
    } 
	static class Pair {
		int u, v;
		public Pair(int u, int v) {
			this.u = u; 
			this.v = v;
		}
	}
	
	public static void main(String args[]) {
    		
    	Scanner inp=new Scanner(System.in);
    	PrintWriter out= new PrintWriter(System.out);
    	
    	long x=inp.nextLong();
    	long n=x;
    	long primeDivisors[]=new long[100];
    	int c=0;
    	if(x%2==0) {
    		primeDivisors[c++]=2;
    		while(x%2==0)
    			x/=2;
    	}
    	for(long i=3;i*i<=n;i+=2) {
    		if(x%i==0) {
    			primeDivisors[c++]=i;
    			while(x%i==0)
    				x/=i;
    		}
    	}
    	if(c>1) {
    		out.println(n/primeDivisors[c-1] +" " + n/primeDivisors[c-2]);
    	}
    	else if(c==1 && x>1) {
    		out.println(primeDivisors[0]+" "+x);
    	}
    	else {
    		out.println("1 "+n);
    	}
    	
    	inp.close();
    	out.close();
    }	
	
	
	
}