
def fctr1(n): 
    f=[]
    c=0
    r=int(n**0.5)
    for i in range(2,r+2):
        while n%i==0:
            c+=1
            n=n//i
        if c!=0:
            f.append([i,c])
            c=0
    if n!=1:
        f.append([n,1])
    return f

def main(n):
    if n == 1:
        return "1 1"
    pairs = fctr1(n)

    if len(pairs) == 1:
        out_txt = "1 %d" % n
    else:
        vals = sorted([x**y for x, y in pairs], reverse=True)
        a = vals[0]
        b = vals[1]
        for val in vals[2:]:
            if a > b:
                b *= val
            else:
                a *= val
        x, y = sorted([a, b])
        out_txt = "%d %d" % (x, y)
    return out_txt

n = int(input())
out_txt = main(n)
print(out_txt)

