import math
def gcd(a, b):
    if(b == 0):
        return a
    return gcd(b, a % b)
n = int(input())
q=math.sqrt(n)
i=int(q)
while i>0:
    if n%i==0 and gcd(i,n//i)==1:
        print(i,n//i)
        break
    i-=1
    