import math def is_prime(n): for divisor in range(2, math.floor(math.sqrt(n))+1): if n % divisor == 0: return False return True def get_divisor(n): for divisor in range(2, math.floor(math.sqrt(n))+1): if n % divisor == 0: return divisor def main(): M = int(input()) if is_prime(M): print(1, M) else: divisor = get_divisor(M) print(M//divisor, divisor) main()