from sys import stdin,stdout
from math import gcd
input = stdin.readline
 
def main():
    #t = int(input())
    t=1
    for i in range(t):
        n = int(input())
        #n, k = map(int,input().split())
        #ai = list(map(int,input().split()))
        n2 = int(n**0.5)
        for i in range(n2,0,-1):
            if n % i == 0 and gcd(i,n//i) == n:
                print(i,n//i)
                break
main()
