
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, large_start=True):
    if n == 1:
        return "1 1"
    pairs = fctr1(n)

    if len(pairs) == 1:
        out_txt = "1 %d" % n

    else:
        vals = [x**y for x, y in pairs]
        for i in range(100):
            #vals = sorted([x**y for x, y in pairs])
            import random
            random.shuffle(vals)
            a = vals[0]
            b = vals[1]
            for val in vals[2:]:
                if a > b:
                    b *= val
                else:
                    a *= val

            x, y = sorted([a, b])
            d = y-x
            if i == 0:
                x0, y0 = x, y
                d0 = d
            else:
                if d < d0:
                    d0 = d
                    x0 = x
                    y0 = y
        out_txt = "%d %d" % (x0, y0)
    return out_txt


def honban():
    n = int(input())
    out_txt = main(n)
    print(out_txt)

def test():
    from fractions import gcd
    for i in range(1, 2311):
        out_txt = main(i)
        a, b = map(int, out_txt.split(" "))
        g = gcd(a, b)
        assert a*b == i and g == 1, (a, b, i, g)
        out_txt = main(i, False)
        a2, b2 = map(int, out_txt.split(" "))
        #assert a==a2 and b==b2, (i, (a, b), (a2, b2))
        if not (a==a2 and b==b2):
            if b-a > b2-a2:
                print (i, (a, b), (a2, b2))
        #print(i, a, b)

honban()
#test()