from math import gcd
n=int(input())
first=1
second=n
answer=[first,second]
while True:
    first+=1
    if n%first!=0:
        second=int(n//first)+1
    else:
        second=int(n//first)
        if gcd(first,second)==1:
            answer=[first,second]
    if first>second or first==second:
        break
print(answer[0],answer[1])

    