from math import gcd   
n=int(input())
if n==1:
    print("1 1")
    exit(0)
x=int(n**0.5)
if x*x==n:
    x=x-1
for i in range(x,0,-1):
    if n%i==0:
        l=n//i
        if ((l*i)//gcd(l,i))==n:
            print(i,n//i)
            exit(0)