from math import gcd as __gcd, sqrt, ceil 
  
def lcm(a, b): 
    return (a // __gcd(a, b) * b) 
  

def findNums(x): 

    if x == 1:
        print(1,1)
        return
    ans = 0
  
    for i in range(1, ceil(sqrt(x))): 
  
        if (x % i == 0 and lcm(i, x // i) == x): 
            ans = i 
  
    print(ans, (x//ans)) 
  

if __name__ == "__main__":
    findNums(int(input())) 
  

