def gcd(a,b):
    if(b==0):
        return a
    else:
        return gcd(b,a%b)
n=int(input())
t=0
for i in range(1,int(n**0.5)+1):
    if n%i==0:
        a=i
        b=int(n/i)
        GCD=gcd(a,b)
        if GCD==1:
            t=i
print(t,int(n/t))
