def gcd(a,b):
    while b:
        a,b=b,a%b
    return a
n=input()
maxx=n
for i in range(1,int(n**(0.5)+1)):
    if n%i==0:
        s=n/i
        x=gcd(i,s)
        m=min(i,s)
        m1=max(i,s)
        m*=x
        maxx=min(maxx,max(m,m1))
a=maxx
b=n/maxx
b*=gcd(a,b)
print min(a,b),max(a,b)
