import math

def LCM(n1, n2):
    return n1*n2//math.gcd(n1, n2)

x = int(input())
a, b = -1, -1
for i in range(1, int(x**.5)+1):
    if x % i == 0:
        if LCM(i, x//i) == x: 
            a, b = i, x//i
print(a, b)
