
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author xylenox
 */
public class c {
    static int MOD = 1000000007;
    public static void main(String[] args) {
        FS in = new FS(System.in);
        PrintWriter out = new PrintWriter(System.out);
        long n = in.nextLong();
        for(long i = (long)Math.sqrt(n)+1000; i > 0; i--) {
            if(n%i != 0) continue;
            long other = n/i;
            if(other < i) continue;
            long lcm = lcm(i, other);
            if(lcm != n) continue;
            out.println(i + " " + other);
            break;
        }
        out.close();
    }
    
    static long lcm(long a, long b) {
        return a/gcd(a,b)*b;
    }
    
    static long gcd(long a, long b) {
        return b == 0 ? a : gcd(b, a%b);
    }
    
    static class FS {
        BufferedReader in;
        StringTokenizer token;
        
        public FS(InputStream st) {
            in = new BufferedReader(new InputStreamReader(st));
        }
        
        public String next() {
            if(token == null || !token.hasMoreElements()) {
                try {
                    token = new StringTokenizer(in.readLine());
                } catch(Exception e) {}
                return next();
            }
            return token.nextToken();
        }
        
        public int nextInt() {
            return Integer.parseInt(next());
        }
        
        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}
