import sys from collections import Counter input = sys.stdin.readline N = int(input()) c = Counter() x = 2 while x * x <= N: while N % x == 0: c[x] += 1 N //= x x += 1 if x > 1: c[N] += 1 resa = 1 resb = 1 for x in c.keys(): if c[x] >= 2: resa *= x ** (c[x] // 2) if c[x] % 2: resb *= x * (c[x] % 2) print(resa, resb)