x = int(input())
y = x
arr = []
s = set()
for i in range(2, int(x**0.5)+1):
    c = 1
    # y = x
    # print(i)
    while(y%i==0):
        y = y//i
        c *= i
        # print(c,i, y)
        # print("and")
    if c!=1 and c not in s:
        arr.append(c)
        s.add(c)
        if y!=1 and y not in s:
            arr.append(y)
            s.add(y)
# print(arr)
# print(arr)
# arr.append(x)
# arr.append(1)
# arr.remove(1)
arr.sort()
ct = 0
try:
    print(arr[0], arr[1])
except:
    print(1, x)
# for i in arr:
#     if i != 1:
#         print(i, end = " ")
#         ct+=1
#     if ct==2:
#         break

# print()
