def check(a, b):
    while True:
        q = b // a
        r = b % a
        if r == 0:
            break
        b = a
        a = r
    
    return a == 1


x = int(input())

for i in reversed(range(1, int(x**0.5) + 1)):
    if x % i == 0:
        y = x // i
        if i == 1:
            print(i, y)
            exit()
        elif check(i, y):
            print(i, y)
            exit()
