// package Div2613;

import javafx.util.Pair;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;

public class ProblemC {
    public  static Pair<Long,Long> solve(ArrayList<Long> a, int index){
        long num=1;
        long max=Long.MAX_VALUE;
        if(index>=a.size()){
            return new Pair<>(1l,1l);
        }
        Pair<Long,Long> op1=solve(a,index+1);
        Pair<Long,Long> op2=solve(a,index+1);
        long s1=op1.getKey();
        long s2=op1.getValue();
        s1*=a.get(index);
        long opp1=Math.max(s1,s2);
        long x1=op2.getKey();
        long x2=op2.getValue();
        x2*=a.get(index);
        long opp2=Math.max(x1,x2);
        Pair<Long,Long> ans;
        if(opp1<opp2){
            ans=new Pair<>(s1,s2);
        }
        else{
            ans= new Pair<>(x1,x2);
        }
//        System.out.println(ans.toString());
        return ans;
    }
    public static void main(String[] args)throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        long n=Long.parseLong(br.readLine());
        int seive[]=new int[1000001];
        ArrayList<Integer> primes=new ArrayList<>();
        for(int i=2;i<seive.length;i++){
            if(seive[i]==0){
                primes.add(i);
                for(int j=2*i;j<seive.length;j+=i){
                    seive[j]=1;
                }
            }
        }
        ArrayList<Long> a=new ArrayList<>();
//        a.add(1l);
        long temp=n;
        HashMap<Integer,Integer> map=new HashMap<>();
        for(int i=0;i<primes.size();i++){
            int prime=primes.get(i);
            int count=0;
            while(temp%prime==0){
                temp/=prime;
                count++;
            }
            if(count!=0){
                map.put( prime,count);
            }
            if(temp==1){
                break;
            }
        }
        if(map.size()==0||map.size()==1){
            System.out.println(n+" "+n);
            return;
        }
        for(int prime:map.keySet()){
            int pow=map.get(prime);
            long num=(long)Math.pow(prime,pow);
            a.add(num);
        }
//        System.out.println(a.toString());
        Pair<Long,Long> ans=solve(a,0);
        System.out.println(ans.getKey()+" "+ans.getValue());
    }
}
