from math import sqrt 
def gcd(a,b): 
    if a == 0: 
        return b 
    return gcd(b % a, a)
def lcm(a,b): 
    return (a*b) / gcd(a,b) 
def solve(n):
    l=[]
    for i in range(1,int(sqrt(n))+1):
        if n%i==0:
            l.append(i)
            l.append(n//i)
    return list(set(l))
x=int(input())
d=solve(x)
final=10**13
a,b=1,x
for i in d:
    if max(i,x//i)<final:
        if lcm(i,x//i)==x:
            a,b=i,x//i
            final=max(i,x//i)
print(a,b)