/**
 * ******* Created  on 10/1/20 7:16 PM*******
 */

import java.io.*;
import java.util.*;

public class C1285 implements Runnable {

    private static final int MAX = (int) (1E5 + 5);
    private static final int MOD = (int) (1E9 + 7);
    private static final long Inf = (long) (1E14 + 10);

    private void solve() throws IOException {
        long x = reader.nextLong();
        long xx=x;
        List<Long> primes = new ArrayList<>();
        for(long i = 2;i*i<=x;i++){
            long cnt =0;
            while(x%i==0){
                x/=i;
                cnt++;
            }
            if(cnt >0)
                primes.add((long) Math.pow(i,cnt));
        }
        if(x >1) primes.add(x);
        Collections.sort(primes);
        long a1=1, a2=1;
        long val1 =1, ans =Long.MAX_VALUE;
        for(int l=0; l< primes.size();l++){
            int r =l;
            while(r < primes.size() && xx/val1 > val1){
                val1 *= primes.get(r++);

            }
           // writer.println(val1+" "+(xx/val1));
            if(Math.max(val1, xx/val1) < ans){
                ans = Math.max(val1, xx/val1);
                 a1= val1;a2 = xx/val1;
            }
            val1 /= primes.get(l);
        }
        writer.println(a1 +" "+a2);
    }

    public static void main(String[] args) throws IOException {
        try (Input reader = new StandardInput(); PrintWriter writer = new PrintWriter(System.out)) {
            new C1285().run();
        }
    }

    StandardInput reader;
    PrintWriter writer;

    @Override
    public void run() {
        try {
            reader = new StandardInput();
            writer = new PrintWriter(System.out);
            solve();
            reader.close();
            writer.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    interface Input extends Closeable {
        String next() throws IOException;

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

        default long nextLong() throws IOException {
            return Long.parseLong(next());
        }

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

        default int[] readIntArray() throws IOException {
            return readIntArray(nextInt());
        }

        default int[] readIntArray(int size) throws IOException {
            int[] array = new int[size];
            for (int i = 0; i < array.length; i++) {
                array[i] = nextInt();
            }
            return array;
        }

        default long[] readLongArray(int size) throws IOException {
            long[] array = new long[size];
            for (int i = 0; i < array.length; i++) {
                array[i] = nextLong();
            }
            return array;
        }
    }

    private static class StandardInput implements Input {
        private final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

        private StringTokenizer stringTokenizer;

        @Override
        public void close() throws IOException {
            reader.close();
        }

        @Override
        public String next() throws IOException {
            if (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
                stringTokenizer = new StringTokenizer(reader.readLine());
            }
            return stringTokenizer.nextToken();
        }
    }
}
