import java.util.*;
public class Power {
    static long power(int a,int b){
        if(b==0)
            return 1;
        long pow=power(a,b/2);
        if(b%2!=0){
            return pow*pow*a;
        }
        else{
            return pow*pow;
        }
    }
    static long gcd(long a,long b){
        if(b==0)
            return a;
        else 
            return gcd(b,b%a);
    }
    static long lcm(long a,long b){
        return (a*b)/gcd(a,b);
    }
    static List<Integer> primes(int n){
            List<Integer> list=new ArrayList<Integer>();
            boolean[] prime=new boolean[n+1];
            Arrays.fill(prime,true);
            prime[0]=false;
            prime[1]=false;
            int sqrt=(int)Math.sqrt(n);
            for(int i=2;i<=sqrt;i++){
                if(prime[i]){
                    for(int j=i*i;j<=n;j=j+i){
                        prime[j]=false;
                    }
                }
            }
            for(int i=0;i<prime.length;i++){
                if(prime[i])
                    list.add(i);
            }
            return list;
    }
    static long catalan(long n){
            long result=0;
            if(n<=1)
                return 1;
            for(long i=0;i<n;i++)
                result+=catalan(i)*catalan(n-i-1);
            return result;
    }
    static long totient(long n){
        long res=0;
        for(long i=1;i<=n;i++){
            if(gcd(i,n)==1)
                res++;
        }
        return res;
        
    }
   /* static double ternarysearch(long low,long high,long[] a,long[] b,long result){
        int t=500;
        while(t-->0 ){
            long m1=low+(high-low)/3;
            long m2=high-(high-low)/3;
            long v1=ft(m1,a,b);
           long v2=ft(m2,a,b);
            result=Math.min(result,Math.min(v1,v2));
            if(v1<result)
                result=v1;
            if(v2<result)
                result=v2;
            if(v1<v2){
                high=m2;
            }
            else
                low=m1;
        }
            for(long i=low;i<=high;i++){
              //  if(ft(i,a,b)<result)
                //    result=ft(i,a,b);
            }
        return result;
    }*/
    static int countone(Integer[] one,int low,int high){
        if(low<=high){
            int mid=(low+high)/2;
            if((mid==high || one[mid+1]==0) && one[mid]==1)
                return mid+1;
            if(one[mid]==1){
                return countone(one,mid+1,high);
            }
            else{
                return countone(one,low,mid-1);
            }
        
        }
        return 0;

    }
    static boolean check(int[] arr){
        for(int i=0;i<arr.length;i++){
            if(arr[i]!=0){
                return false;
            }
        }
        return true;
    }
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
           long x=input.nextLong();
            long a=1;
            long b=x;
            long ans=x;
            for(long i=1;i*i<=x;i++){
                if(x%i!=0)continue;
                long aa=i;
                long bb=x/i;
                if(lcm(aa,bb)==x){
                   if(Math.max(aa,bb)<ans){
                       a=aa;
                       b=bb;
                       ans=Math.max(aa,bb);
                   }
                }
            }
        System.out.println(a+" "+b);
       
        }
}