'''Author- Akshit Monga'''
from sys import stdin, stdout
import math
def gcd(a, b):
    if a == 0:
        return b
    return gcd(b % a, a)
def lcm(a, b):
    return (a / gcd(a, b)) * b
input = stdin.readline
t=1
for _ in range(t):
    x=int(input())
    m=float('inf')
    a=1
    b=x
    for i in range(1,int(math.sqrt(x))+2):
        if x%i==0:
            if max(i,x//i)<m and lcm(i,x//i)==x:
                m=max(i,x//i)
                a=i
                b=x//i
    print(a,b)