import java.util.*;
public class CF_1285_C {
    public static HashMap<Long,Long> construct(long lcm) {
        HashMap<Long,Long> hm=new HashMap<>();
        for(long i=2;i*i<=lcm;++i) {
            while(lcm%i==0) {
                hm.put(i,hm.getOrDefault(i*1l,1l)*i);
                lcm/=i;
            } 
        }
        if(lcm>1)
            hm.put(lcm,hm.getOrDefault(lcm,1l)*lcm);
        return hm;
    }
    private static class Pair {
        long i;
        long j;
        public Pair(long i, long j) {
            this.i=i;
            this.j=j;
        }
        @Override
        public String toString() {
            return i+" "+j;
        }
    }
    public static Pair minimize(Pair[] arr,long a,int i,long b) {
        if(i==arr.length) {
            Pair aa= new Pair(Math.min(a,b),Math.max(a,b));
            // System.out.println(aa);
            return aa;
        }
        Pair aa=minimize(arr, a*arr[i].j, i+1, b);
        Pair bb=minimize(arr, a,i+1, b*arr[i].j);
        // System.out.println(aa);
        // System.out.println(bb);
        if(aa.j<bb.j)
            return aa;
        else
            return bb;
    }
    public static void main(String args[]) {
        Scanner sc=new Scanner(System.in);
        long lcm=sc.nextLong();
        HashMap<Long,Long> hm=construct(lcm);
        Pair pairs[]=new Pair[hm.size()];
        int count=0;

        for(Map.Entry<Long,Long>entry:hm.entrySet()) {
            long key=entry.getKey();
            long val=entry.getValue();
            pairs[count++]=new Pair(key,val);
            // System.out.println(pairs[count-1]);
        }
        Pair pp=minimize(pairs, 1, 0, 1);
        System.out.println(pp.i+" "+pp.j);
    }
}