x = int(input())
# y = x
arr = []
s = set()
ans = [1, x]
lo_so_far = x
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
        lo = max(c,y)
        if lo<lo_so_far:
            
            if c==y:
                continue
            ans = (c,y)
            lo_so_far = lo
        # 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)
print(ans[0], ans[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()
