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


public class Codeforces2 {
    public static void main(String[] args) throws IOException {

        Scanner s=new Scanner(System.in);
        int X=s.nextInt();
        List<Integer> list=new ArrayList<>();
        for(int i=1;i<=X;i++)
        {
            if(X%i==0)
            {
                list.add(i);
            }
        }
        int l=0,r=list.size()-1;
        int a1=1,b1=X;
        while(l<r)
        {
            int a=list.get(l);
            int b=list.get(r);
            if(b%a!=0)
            {
                a1=a;
                b1=b;
            }
            l++;r--;
        }
        System.out.println(a1+" "+b1);
    }
}
class Pair{
    int a,b;
    Pair(int a,int b)
    {
        this.a=a;
        this.b=b;
    }
}