from collections import defaultdict n=int(input()) def prime_list(x): i=2 prime=defaultdict(int) while i*i<=x: while x%i==0: x//=i prime[i]+=1 i+=1 if x>1: prime[x]+=1 return prime p=prime_list(n) ans1=1 ans2=1 for x in p: if p[x]%2==1: ans1*=x ans2*=x**(p[x]//2) print(ans2,ans1)