import sys
def fastio():
    from io import StringIO
    from atexit import register
    global input
    sys.stdin = StringIO(sys.stdin.read())
    input = lambda : sys.stdin.readline().rstrip('\r\n')
    sys.stdout = StringIO()
    register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()

def debug(*var, sep = ' ', end = '\n'):
    print(*var, file=sys.stderr, end = end, sep = sep)

INF = 10**20
MOD = 10**9 + 7
I = lambda:list(map(int,input().split()))
from math import gcd
from math import ceil
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br

M = 1000010
x, = I()
fac = [INF] * 1000010
primes = []
p = [1] * M
temp = x

for i in range(2, M):
    if not p[i]: continue

    for j in range(2 * i, M, i):
        p[j] = 0
    primes.append(i)

f = True
for i in primes:
    if x % i: continue
    fac[i] = 0  
    while x % i == 0:
        fac[i] += 1
        x //= i
    f = False

if x != 1:
    fac[x] += 1
    fac[temp//x] += 1

# print(fac[:10])
ans = INF
a = 1
b = 1
for i in range(M):
    if fac[i] >= INF: continue
    ta = i ** fac[i]
    tb = temp // ta
    if fac[i] < ans and (ta * tb) // gcd(ta, tb) == temp:
        ans = fac[i]
        a = ta
        b = tb
print(a, b)