import math
x=int(input())

def gcd(a, b):
    if a == 0:
        return b
    return gcd(b % a, a)

def lcm(a, b):
    return (a * b) / gcd(a, b)

def solve(x):
    for i in range(1,int(math.sqrt(x))+1):
        if lcm(i,x/i)==x:
            print i,x/i
            return
solve(x)

