MOD = 1000000007
MOD2 = 998244353
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
mn=10**15
from math import gcd
X=ii()
for i in range(1,int(X**0.5)+1):
    if X%i==0 and gcd(i,X//i)==1:
        mn=min(mn,X//i)
print(X//mn,mn)