from math import gcd

def lcm(a,b):
    return a*b // gcd(a,b)
n = int(input())
inf = 9999999999999
a,b = inf,inf
if n==1:
    print(1,1)
    exit()
for i in range(1,int(n**0.5)+1):
    if n%i==0 and max(a,b) > max(i,n//i) and lcm(i,n//i)==n:
        a = n//i
        b = i

print(a,b)
