
import java.io.BufferedReader;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.*;

import javafx.util.Pair;

public class Main
{       
    public static long GCD(long n1, long n2)
    {
        if (n1 == 0) {
            return n2;
        }
        return GCD(n2 % n1, n1);
    }

    public static void main(String args[])
    {
        FastScanner input = new FastScanner();
        
      long n = input.nextLong();
      int sqrt = (int) Math.sqrt(n);
        for (long i = sqrt; i>=1; i--) {
            if(n%i==0)
            {
               if(GCD(i, n/i)==1L)
               {
                   System.out.println(i+" "+(n/i));
                   return;
               }
            }
        }
        
        
    }

    static class FastScanner
    {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        String next()
        {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {

            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine() throws IOException
        {
            return br.readLine();
        }
    }

}
