import java.io.*;
import java.text.*;
import java.util.*;
 
public class Ash3 {
 
	static boolean multipleTC = false;
	static long mod = (long) 1e9 + 7;
 
	void solve(int TC) throws Exception {
		long n = in.nl();
		long x = n, y = 1;
		for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				long a = i, b = n / i;
				if (x > Math.max(a, b) && n == (a * b) / gcd(a, b)) {
					x = Math.max(a, b);
					y = Math.min(a, b);
				}
			}
		}
		pl(y+" "+x);
	}
 
	public static long gcd(long a, long b) {
		return (b == 0) ? a : gcd(b, a % b);
	}
 
	DecimalFormat df = new DecimalFormat("0.00000000000");
	FastReader in;
	PrintWriter out;
 
	void run() throws Exception {
		in = new FastReader();
		out = new PrintWriter(System.out);
		int T = (multipleTC) ? in.ni() : 1;
		pre();
		for (int t = 1; t <= T; t++)
			solve(t);
		out.flush();
		out.close();
	}
 
	public static void main(String[] args) throws Exception {
		new Ash3().run();
	}
 
	void pre() throws Exception {
	}
 
	void p(Object o) {
		out.print(o);
	}
 
	void pl(Object o) {
		out.println(o);
	}
 
	void pni(Object o) {
		out.println(o);
		out.flush();
	}
 
	class FastReader {
		BufferedReader br;
		StringTokenizer st;
 
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		public FastReader(String s) throws Exception {
			br = new BufferedReader(new FileReader(s));
		}
 
		String next() throws Exception {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					throw new Exception(e.toString());
				}
			}
			return st.nextToken();
		}
 
		String nextLine() throws Exception {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				throw new Exception(e.toString());
			}
			return str;
		}
 
		int bit(long n) {
			return (n == 0) ? 0 : (1 + bit(n & (n - 1)));
		}
 
		String n() throws Exception {
			return in.next();
		}
 
		String nln() throws Exception {
			return in.nextLine();
		}
 
		int ni() throws Exception {
			return Integer.parseInt(in.next());
		}
 
		long nl() throws Exception {
			return Long.parseLong(in.next());
		}
 
		double nd() throws Exception {
			return Double.parseDouble(in.next());
		}
	}
}