def gcd(a,b):
    if a%b==0:
        return b
    else:
        return gcd(b,a%b)

def fadi(n):

    for i in range(int(n**(1/2)),1,-1):
        if n%i==0 :
            if gcd(n//i,i)==1:
                print(n//i,i)
                return
    else:
        print(1,n)
        return

t=int(input())
fadi(t)