# Problem: C. Fadi and LCM
# Contest: Codeforces - Codeforces Round #613 (Div. 2)
# URL: https://codeforces.com/problemset/problem/1285/C
# Memory Limit: 256 MB
# Time Limit: 1000 ms
# 
# Powered by CP Editor (https://cpeditor.org)

from sys import stdin, stdout 

def INI():
	return int(stdin.readline())
	
def INL():
	return [int(_) for _ in stdin.readline().split()]
	
def INS():
	return stdin.readline()

def MOD():
        return pow(10,9)+7
	
def OPS(ans):
	stdout.write(str(ans)+"\n")
	
def OPL(ans):
	[stdout.write(str(_)+" ") for _ in ans]
	stdout.write("\n")

from math import log,gcd

	
def factor(n):
	global ans 
	ANS=[]
	for _ in range(1,int(log(n+1,2)+1)):
		if n%_==0 and gcd(_,n//_)==1:
			if max(_,n//_)<ans:
				ans=max(_,n//_)
				ANS=[_,n//_]
	return ANS
			
if __name__=="__main__":
	n=INI()
	
	ans=float("inf")
	ans=factor(n)
	
	OPL(ans)