def factors(n): f = [] c = 0 while n % 2 == 0: n //= 2 c += 1 if c > 0: f.append([2, c]) p = 3 while p * p <= n: if n % p == 0: c = 0 while n % p == 0: n //= p c += 1 if c > 0: f.append([p, c]) p += 2 if n != 1: f.append([n, 1]) return f N = int(input()) a = b = 1 for p, x in factors(N): a *= int(pow(p, x//2)) if x % 2 == 1: b *= p print(a, b)