import math
def gcd(a, b):
    if a == 0:
        return b
    return gcd(b % a, a)

def lcm(a, b):
    return (a * b) / gcd(a, b)

x = int(input())
for i in range(1, int(math.ceil(math.sqrt(x))) + 1):
    if x % i == 0 and lcm(i, x//i) == x:
        ans = i

print(ans, x//ans)