def F(n):
    Ans = [1, 1]
    d = 2
    i = 0
    while d * d <= n+1:
        if n % d == 0 or n == 1:
            n //= d
            Ans[i] *= d
        else:
            d += 1
            if Ans[i] > Ans[(i+1)%2]:
                i = (i+1)%2
    if Ans[i] > Ans[(i+1)%2 and Ans[i]%n != 0]:
        i = (i+1)%2
    Ans[i] *= n
    print(*sorted(Ans))
F(int(input()))
