from math import sqrt, gcd

def main():
    lcm = int(input())
    n = int(sqrt(lcm)) + 1
    for a in range(n, 0, -1):
        if not lcm % a:
            b = lcm // a
            if gcd(a, b) == 1:
                print(a, b)
                return 0
main()