def main():
    n = x = int(raw_input())
    p = []
    for i in xrange(2, 10 ** 6):
        if x % i == 0:
            t = 1
            while x % i == 0:
                x /= i
                t *= i
            p.append(t)
    a = 1
    b = n
    for i in xrange(1 << len(p)):
        r = 1
        for j, x in enumerate(p):
            if i >> j & 1:
                r *= x
        m = n / r
        if r > m:
            r, m = m, r
        if b > m:
            a, b = r, m
    print a, b
main()
