def NOD(a, b):
    while b != 0:
        a, b = b, a % b
    return a


x = int(input())
Min = 10 ** 12

for i in range(2, int(x ** 0.5) + 2):
    if i * (x // i) // NOD(i, x // i) == x:
        Max = max(i, x // i)
        if Max < Min:
            Min = Max

if Min == 10 ** 12:
    Min = x

print(x // Min, Min)
