#for _ in range(int(input())):
n = int(input())
#n,k=map(int, input().split())
#arr = list(map(int, input().split()))
#ls= list(map(int, input().split()))
ans=1
import math
for i in range(int(n**0.5),0,-1):

    if n%i==0 and n//i!=i:
        ans=i
        if (i*(n//i))//math.gcd(i,n//i)==n:
            break
print(n//ans, ans)
