n=int(input())
z=n
flag=0
for i in range(1,int(n**0.5)+1):
    if n%i==0:
        x=n//i
        if x%i!=0 and i%x!=0:
            print(i,x)
            flag=1
            break
if flag==0:
    print(1,n)