from math import ceil
n = int(input())

def lcm(a,b):
    m = a*b
    while a != 0 and b != 0:
        if a > b:
            a %= b
        else:
            b %= a
    return m // (a+b)


t =  ceil(n**0.5)
if n !=1:
    t+=1
while 1:
    if (n % t == 0 and lcm(t,n//t)==n) or n == 1:
     a = t
     b = n // t
     break
    else:
        t-=1
print(a,b)
