import sys
from math import sqrt, gcd
from bisect import bisect
inp = sys.stdin.readline
read = lambda: list(map(int, inp().strip().split()))

# sys.setrecursionlimit(10**6)



def solve():
	n = int(inp())
	for i in range(int(sqrt(n)+1), 0, -1):
		if n%i == 0 and gcd(i, n//i) == 1:
			print(i, n//i)
			break

if __name__ == "__main__":
	solve()