
import java.util.*;

public class C {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        ArrayList<Long> list = new ArrayList<>();
        long A = sc.nextLong();
        int sqrt =(int) Math.sqrt(A);

        for(int i = 1 ; i<= sqrt ; i++)
        {
            if(A%i == 0)
            {
                list.add((A/i));
                list.add((long)i);
            }
        }
        Collections.sort(list);
        int r = list.size()%2 == 0?list.size()/2 - 1:list.size()/2;
        int l = list.size()/2;
        while(l<list.size())
        {
            long a = list.get(l);
            long b = list.get(r);
            l++;
            r--;
            if(a==b && a!=1)
                continue;
            int gcd = gcd(a,b);
            if(gcd == 1 || (a*b)/gcd == A)
            {
                System.out.println(b+" "+a);
                break;
            }

        }
    }
    static int gcd(long a , long b)
    {
        if(b == 0)
            return 1;
        return gcd(b , a % b);
    }
    static int bf(int n)
    {
        int a =1, b=n;
        for(int i = 1 ;i <  n ;i++)
        {
            for(int j = i+1 ; j< n ;j++)
            {
                if(i*j / gcd(i,j) == n)
                {
                    if(Math.max(a,b) > Math.max(i,j))
                    {
                        a = i ;
                        b = j;
                    }
                }
            }
        }
        System.out.println(a +" "+b);
        return 0 ;
    }
}
