X = int(input())
sq1 = X**0.5
sq = int(sq1)
u=0
def gcd(x, y):
    while(y): 
        x, y = y, x % y 
    return x
if(X%sq1 == 0):
    sq-=1
if(X==1):
    print(1,1)
elif(X==2):
    print(1,2)
elif(X==3):
    print(1,3)
else:
    while(sq>0):
        if(X%sq == 0):
            q = X//sq
            if((gcd(sq, q) != 1 and sq!=1)):
                sq-=1
                continue
            else:
                print(sq,q)
                break
        sq-=1