program main
  implicit none
  integer :: X
  integer(8) :: i,j
  read(*,*) X

  do i = -118,119
     do j = -119,118
        if (X == i**5 - j**5) then
           write(*,'(i0,x,i0)') i,j
           stop
        end if
     end do
  end do
 
  
end program main
