"""GCD(GCF) get greatest common divisor/factor (Euclid's algorithm)"""
def gcd(x, y):
    while y != 0:
        (x, y) = (y, x % y)
    return x

"""LCM get lowest common multiple. need gcd function"""
def lcm(x ,y):
    return x*y//gcd(x,y)

x=int(input())

for i in range(int(x**0.5+1),0,-1):
    if x%i==0 and lcm(i,x//i)==x:
        a=i
        b=x//i
        break
print('{} {}'.format(a,b))