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

