n=int(input())
i=1
d=[]
while i*i<=n:
    if n%i==0:d.append(i)
    i+=1
d.reverse()
def gcd(a,b):
    if a>b:a,b=b,a,
    while b:
        a,b=b,a%b
    return a
def lcm(a,b):
    return a*b//gcd(a,b)
for u in d:
    if lcm(u,n//u)==n:
        print(u,n//u)
        exit(0)
        
