import math
ans = []
def printSubsequences(arr, n):
    opsize = math.pow(2, n)
    l =[]
    for counter in range( 1, (int)(opsize)):
        xc = []
        for j in range(0, n):
            if (counter & (1<<j)) :
                xc.append(arr[j])
        l.append(xc)
    return l
def primeFactors(n):
    while n % 2 == 0:
        ans.append(2)
        n = n // 2
    for i in range(3,int(math.sqrt(n))+1,2):
        # print(ans)
        while n % i == 0:
            # print(ans)
            ans.append(i)
            n = n // i
    if n > 2:
        ans.append(n)
q = int(input())
primeFactors(q)
a = 1
b = 1
if len(ans) > 0:
    # print(*ans)
    # pre = [ans[0]]
    # for t in range(1, len(ans)):
    #     pre.append(pre[-1] * ans[t])
    # bvb = []
    # for t in pre:
    #     bvb.append([t, q//t])
    # a = bvb[0][0]
    # b = bvb[0][1]
    # for j in bvb:
    #     if max(j[0], j[1]) < max(a, b):
    #         a = j[0]
    #         b = j[1]
    k = printSubsequences(ans, len(ans))
    pre = []
    for t in k:
        z = 1
        for i in t:
            z *= i
        pre.append(z)
    bvb = []
    for t in pre:
        bvb.append([t, q//t])
    a = bvb[0][0]
    b = bvb[0][1]
    for j in bvb:
        if max(j[0], j[1]) < max(a, b):
            a = j[0]
            b = j[1]
    if a % b != 0 and b % a != 0:
        print(min(a, b), max(a, b))
    else:
        print(1, q)
else:
    print(1, 1)