n=int(input())
import math
r=int(n**0.5)+1
a=[]
def lcm(a, b):
    return abs(a*b) // math.gcd(a, b)
for _ in range(1,r):
    if (n/_==int(n/_)) and lcm(_,n//_)==n:
        b=[_,n/_]
        b.sort()
        a.append(b)
def sort1(val):
    return val[1]
a.sort(key=sort1)
print(int(a[0][0]),int(a[0][1]))