program main
    implicit none
    integer(8) X, A, B, i
    double precision C
    i = 0
    read *, X
    do
        A = i ** 5
        C = A - X
        if (C >= 0) then
            B = C ** 0.2
            if (B == C ** 0.2) then
                print *, i, B
                exit
            end if
        else
            B = (- C) ** 0.2
            if (B == (- C) ** 0.2) then
                print *, i, - B
                exit
            end if
        end if
        i = i + 1
    end do
    stop
contains

end program main