import math

def gcd(a, b):
    if b == 0:
        return a

    return gcd(b, a % b)

x = int(input())

for a in range(int(math.sqrt(x)), 0, -1):
    if x % a != 0:
        continue

    b = x // a

    if gcd(a, b) == 1:
        print(a, b)
        break
