"""
arr = list(map(int, input().split()))
n,k=map(int, input().split())
"""
import math
import sys
# input = sys.stdin.readline

############ ---- Input Functions ---- ############
def inp(): #Reads integer input
    return(int(input()))
def inlt(): #Reads list of int
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))
def invr(): #Reads numbers into separate var
    return(map(int,input().split()))

number = int(input())
for i in range(1, math.floor(math.sqrt(number)) + 1):
    if number % i == 0 and number / i != i:
        first, second = i, number / i
if number == 1:
    print(1, 1)
else:
    print(first, int(second))