n = int(input()) a = 1 b = 1 for i in range(2,n): while n % i == 0: if n % (i**2) == 0: a *= i n //= i**2 else: b *= i n //= i print(a,b)