# a, b is co-prime
from math import ceil, sqrt

def gcd(a, b):
	return gcd(b, a % b) if a % b else b

x = int(input())

for i in range(ceil(sqrt(x)), 0, -1):
	if x % i == 0 and gcd(i, x // i) == 1:
		print(i, x // i)
		break
