import math
def uscln(a, b):
    if (b == 0):
        return a
    return uscln(b, a % b)
def bscnn(a, b):
    return int((a * b) / uscln(a, b))

def LCM(n):
    for i in range(int(math.sqrt(n)), 0, -1):
        if n % i == 0:
            if uscln(i, n//i) == 1:
                return (i, n//i)
    return (1, n)
n = int(input())
print(*LCM(n))
