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


def isValid(a, b, x):
    temp = (a * b) / gcd(a, b)
    if temp == x:
        return True
    else:
        return False


def solve(x):
    if x == 1:
        print(1, 1)
        return 
    for i in range(1, x // 2 + 1):
        if x % i == 0 and isValid(i, x / i, x):
            print(i, x // i)
            return



def main():
    x = int(input())
    solve(x)

main()