import math
def lcm(a,b):
    return (a*b)//math.gcd(a,b)
n = int(input())
x = n
if n==1:
    print(1,1)
    exit(0)
m = 10000000000000000000000
for i in range(1,n):
    if i*i>n:
        break
    if (x%i==0) and lcm(x//i,i)==x:
        m = min(m,x//i)
print(m,x//m)