program main
  
  implicit none
  integer(16) :: a,b,x, tmp
  integer(16) :: ansa, ansb
  
  read(*,*) x
  
  ansa = 0 
  ansb = 0 
  do a = -130, 130
    tmp = a**int(5,kind=16) - x
    do b = -130, 130
      if (tmp == b**5) then
        ansa = a
        ansb = b
      end if
    end do
  end do
  
  print*, ansa, ansb
  
  
end program main

