#print(448630 * 447051)
import math

def function(n):
    if n==1:
        return f'{1} {1}'
    for i in range(math.floor(math.sqrt(n)), 1, -1):
        if n%i==0:
            if math.gcd(i, int(n/i))==1:
                return f'{i} {int(n/i)}'
    return f'{1} {n}'

if __name__=='__main__':
    n=int(input())
    print(function(n))