program main
    implicit none
    integer(8) x
    integer(8) i,j
    integer(8) a,b,a5,b5
    real(8) t
    read(*,*) x

    do i = -1000,1000
        b = i
        b5 = b*b*b*b*b
        t = dble(x + b5)
        t = t**0.2
        a = int(t)
        a5 = a*a*a*a*a
        if(a5-b5 == x) then
            write(*,*) a, b
            exit
        end if
    end do


end program