import java.util.*;
import java.lang.*;
// StringBuilder uses java.lang
 
 
public class mC {
    
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long m = sc.nextLong();
        long t = (long)(Math.floor(Math.sqrt(m)));
        boolean pos = false;
        for (long i=t;i>0;i--) {
            if (m % i == 0) {
                if (gcdd(i,m/i)==1) {
                    System.out.print(i);
                    System.out.print(" ");
                    System.out.println((m/i));
                    break;
                    
                }
            }
        }
    }
    public static int findNthInArray(int[] arr,int val,int start,int o) {
        if (o==0) {
            return start-1;
        } else if (arr[start] == val) {
            return findNthInArray(arr,val,start+1,o-1);
        } else {
            return findNthInArray(arr,val,start+1,o);
        }
    }
    public static ArrayList<Integer> dfs(int at,ArrayList<Integer> went,ArrayList<ArrayList<Integer>> connect) {
        for (int i=0;i<connect.get(at).size();i++) {
            if (!(went.contains(connect.get(at).get(i)))) {
                went.add(connect.get(at).get(i));
                went=dfs(connect.get(at).get(i),went,connect);
            }
        }
        return went;
    }
    public static long fastPow(int base,long exp,long mod) {
        if (exp==0) {
            return 1;
        } else {
            if (exp % 2 == 1) {
                long z = fastPow(base,(exp-1)/2,mod);
                return ((((z*base) % mod) * z) % mod);
            } else {
                long z = fastPow(base,exp/2,mod);
                return ((z*z) % mod);
            }
        }
    }
    public static long fastPow(int base,long exp) {
        if (exp==0) {
            return 1;
        } else {
            if (exp % 2 == 1) {
                long z = fastPow(base,(exp-1)/2);
                return ((((z*base)) * z));
            } else {
                long z = fastPow(base,exp/2);
                return ((z*z));
            }
        }
    }
    public static int firstLarger(int val,ArrayList<Integer> ok,int left,int right) {
        if (ok.get(right)<=val) {
            return -1;
        }
        if (left==right) {
            return left;
        } else if (left+1==right) {
            if (val<ok.get(left)) {
                return left;
            } else {
                return right;
            }
        } else {
            int mid = (left+right)/2;
            if (ok.get(mid)>val) {
                return firstLarger(val,ok,left,mid);
            } else {
                return firstLarger(val,ok,mid+1,right);
            }
        }
    }
    public static long gcdd(long a, long b) {
        if (b==0) {
            return a;
        } else if (a==0) {
            return b;
        } else if (b>a) {
            return gcdd(a,b%a);
        } else {
            return gcdd(a%b,b);
        }
    }
}