def lcm():
    x = int(input())
    if x == 1:
        values = (1, 1)
    else:
        values = (10**12,10**12)
        for i in range(1, int(x**0.5)+1):
            if x % i == 0:
                p_max = max(i, x//i)
                if p_max < max(values) and i!=x//i:
                    values = (i, x//i)
    print(*values)
lcm()