import math
def lcm(a, b):
    return abs(a*b) // math.gcd(a, b)
    
a=int(input())
for i in range(1,int(a**0.5)+1):
    if(a%i==0):
        m=i
n=a//m
l=lcm(n,m)
if(l==a):
    print(m,n)
else:
    l=a//l
    print(m*l,n)
    