from sys import *
from math import *

def lcm(a, b):
    return abs(a*b) // gcd(a, b)
n=int(stdin.readline())
a=1
b=1
for i in range(1,int(sqrt(n))+1):
    p1=a
    p2=b
    if n%i==0:
        a=i
        b=n//i
        if lcm(a,b)!=n:
            a=p1
            b=p2
print(a,b)