import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.math.*;


public class Codeforces2 {
    static long gcd(long a, long b)
    {
        if (a == 0)
            return b;
        return gcd(b % a, a);
    }

    // method to return LCM of two numbers
    static long lcm(long a, long b)
    {
        return (a*b)/gcd(a, b);
    }
    public static List<Long> primeFactors(long n)
    {
        // Print the number of 2s that divide n
        List<Long> list=new ArrayList<>();
        while (n%2==0)
        {
            list.add(2L);
            n /= 2;
        }

        // n must be odd at this point.  So we can
        // skip one element (Note i = i +2)
        for (long i = 3; i <= Math.sqrt(n); i+= 2)
        {
            // While i divides n, print i and divide n
            while (n%i == 0)
            {
                list.add(i);
                n /= i;
            }
        }

        // This condition is to handle the case whien
        // n is a prime number greater than 2
        if (n > 2)
            list.add(n);
        return list;
    }
    public static void main(String[] args) throws IOException {

        Scanner s=new Scanner(System.in);
        long X=s.nextLong();

        long sqr= (long) Math.sqrt(X);
        long ans=X;
        long a=1,b=X;
        for(int i=1;i<=sqr;i++)
        {
            if(X%i==0 && gcd(i,X/i)==1)
            {
                long val=Math.max(i,X/i);
                if(val<ans)
                {
                    ans=val;
                    a=i;
                    b=X/i;
                }
            }
        }
        System.out.println(a+" "+b);

//        List<Pair> list=new ArrayList<>();
//        list.add(new Pair(1L,X));
//        for(int i=2;i<=X;i++)
//        {
//            if(X%i==0)
//            {
//                if(i<(X/i))
//                {
//                    list.add(new Pair(i,X/i));
//                }
//            }
//        }
//        long a=1,b=X;
//        for(int i=1;i<list.size();i++)
//        {
//            if(lcm(list.get(i).b,list.get(i).a)==X)
//            {
//                b=list.get(i).b;
//                a=list.get(i).a;
//            }
//        }
//        System.out.println(a+" "+b);
    }
}
class Pair{
    long a,b;
    Pair(long a,long b)
    {
        this.a=a;
        this.b=b;
    }
}