C = int(input()) if C % 2 == 0: A = 2 B = C // 2 else: check_max = C // 2 for A in range(3,check_max): if not C % A: break else: A = 1 B = C // A print("%d %d" % (A,B))