def gcd(x, y):
    while y:
        x, y = y, x % y
    return x

def lcm(x,y):
    return x//gcd(x,y)*y


x = int(input())

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

print(" ".join([str(ans),str(x//ans)]))