import java.util.*;

import java.io.*;

public class dsu {

	static class pair implements Comparable<pair> {
		int i;
		int x;
		int y;

		public pair(int q, int d, int k) {
			i = q;
			x = d;
			y = k;
		}

		@Override
		public int compareTo(pair arg0) {
			if (x == arg0.x) {
				if (i == arg0.i) {
					if (i < 0)
						return arg0.y - y;
					else
						return y - arg0.y;
				}
				return -i;
			}
			return x - arg0.x;
		}
	}

	static int x, y, d;

	static void extendedEuclid(int a, int b) {
		if (b == 0) {
			x = 1;
			y = 0;
			d = a;
			return;
		}
		extendedEuclid(b, a % b);
		int x1 = y;
		int y1 = x - a / b * y;
		x = x1;
		y = y1;
	}

	static int a[];
	static int n;
	static int memo[][][];

	static int dp(int sum, int idx, int x) {

		if (idx == n) {
			return 0;
		}
		if (memo[x][idx][sum] != -1) {
			return memo[x][idx][sum];
		}
		long t = 0, l = 0, z = 0;
		if (x == 0) {
			z = dp(sum, idx + 1, 0);
			t = dp(sum + a[idx], idx + 1, 1) + (sum + a[idx] == 10000 ? 1 : 0);
			l = dp(sum - a[idx], idx + 1, 1) + (sum - a[idx] == 10000 ? 1 : 0);
		} else {
			t = dp(sum + a[idx], idx + 1, 1) + (sum + a[idx] == 10000 ? 1 : 0);
			l = dp(sum - a[idx], idx + 1, 1) + (sum - a[idx] == 10000 ? 1 : 0);
		}

		return memo[x][idx][sum] =(int)( (t + l + z) % (int) 1000000007);
	}

	static ArrayList<Integer> primes;
	static int[] isComposite;
	
	static void sieve(int N)	// O(N log log N) 
	{
		isComposite = new int[N+1];					
		isComposite[0] = isComposite[1] = 1;			// 0 indicates a prime number
		primes = new ArrayList<Integer>();

		for (int i = 2; i <= N; ++i) 					//can loop till i*i <= N if primes array is not needed O(N log log sqrt(N)) 
			if (isComposite[i] == 0) 					//can loop in 2 and odd integers for slightly better performance
			{
				primes.add(i);
				if(1l * i * i <= N)
					for (int j = i * i; j <= N; j += i)	// j = i * 2 will not affect performance too much, may alter in modified sieve
						isComposite[j] = 1;
			}   
	}

	/*
	 * 2. Primality Test
	 * 
	 *  Preprocessing: call sieve with sqrt(N), O(sqrt(N) log log sqrt(N))
	 *  Query: best case O(1), worst case O(sqrt(N) / log sqrt(N))
	 */
	static boolean isPrime(int N)
	{
		if(N < isComposite.length)
			return isComposite[N] == 0;
		for(int p: primes)					//may stop if p * p > N
			if(N%p==0)
				return false;
		return true;
	}
	
	
	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);
		StringTokenizer st = new StringTokenizer(br.readLine());
		long n = Long.parseLong(st.nextToken());
		
		long l=(long) Math.sqrt(n);
		sieve((int)l);
		long x=0;
		long q=0;
		long e=0;
		long r=0;
		long min=(long)1000000000;
		
		while(l>0) {
			if(n%l==0 && n/l!=l && gcd((n/l),l)==1) {
				e=n/l;
				r=l;
				if(Math.max(q,x)<min) {
					min=Math.max(q,x);
					x=e;q=r;
				}
			}
			l--;
		}
		if(x==0 &&q==0)
			pw.print(1+" "+n);
		else
			pw.print(x+" "+q);
		pw.flush();
	}

	public static int stringCompare(String str1, String str2) {

		int l1 = str1.length();
		int l2 = str2.length();
		int lmin = Math.min(l1, l2);

		for (int i = 0; i < lmin; i++) {
			int str1_ch = (int) str1.charAt(i);
			int str2_ch = (int) str2.charAt(i);

			if (str1_ch != str2_ch) {
				return str1_ch - str2_ch;
			}
		}

		if (l1 != l2) {
			return l1 - l2;
		}

		// If none of the above conditions is true,
		// it implies both the strings are equal
		else {
			return 0;
		}
	}

	static long gcd(long a, long b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}
	static long lcm(long a,long b) {
		return(a*b/gcd(a,b));
	}

}