import math
n= int(input())

x = int(math.sqrt(n))+1
a = []
for i in range(1,x):
    if n%i == 0:
        y = n //i
        if y != i:
            a.append(i)
            a.append(y)
l = len(a)
if a ==[]:
    print(1, n)
else:
    a = sorted(a)
    for i in range(l//2,l):

        if math.gcd(a[i], n//a[i]) == 1:
            print(n//a[i], a[i])
            exit()

