   program abc166d
      implicit none
      integer(8)::x
      integer(8)::i,j,n

         read *, x

         n=0
         do while ( (n**5-(n-1)**5) > x)
            n=n+1
         end do

         do i=-n,n
            do j=-n,n
               if ((i**5-j**5)==x) then
                  print *, i,j
                  stop
               end if
            end do
         end do

   end program abc166d