from sys import stdin, setrecursionlimit
setrecursionlimit(pow(10, 9))

# stdin = open("testdata.txt", "r")

import math

def input():
	return stdin.readline().strip()


def are_coprimes(a, b):
	if not ((a | b) & 1): 
		return False
	return math.gcd(a, b) == 1

def get_pairs(x):
	min_num = x

	for i in range(int(math.sqrt(x)), 0, -1):
		if x%i == 0:
			if are_coprimes(i, x//i):
				return i, x//i
	return 1, x

x = int(input())
ans = get_pairs(x)
print(*ans)