import math
def findLcm(a,b):
    lar = max(a, b) 
    small = min(a, b)
    i=lar
    while(True):
        if (i % small == 0):
            return i
        i+=lar
def main():
    x=int(input())
    a=math.floor(math.sqrt(x))
    for i in range(a,0,-1):
        if(x%i==0 and findLcm(i,x/i)==x):
            print(i,x//i)
            break
    #print(findLcm(4096,244140625))
main()