n = int(input()) root_n = int(n**0.5)+1 for b in range(1,n+1): for a in range(1,root_n+1): if n==(a**2)*b: print(a,b) break else: continue break