def gcd(a,b):
    if a==0:
        return b
    else:
        return gcd(b%a,a)
def lcm(a,b):
    return (a*b)//gcd(a,b)
x=int(input())

ans=0
i=1
while i*i<=x:
    if x%i==0 and lcm(i,x//i)==x:
        ans=i
    i+=1
print(ans,x//ans)