program sample
implicit none
integer(8)X,k,i
integer(8) A,B,A1,B1
read(*,*)X
A1=0
B1=0
do A=-150,150
do B=-150,150
if (A**5-B**5==X) then
A1=A
B1=B
end if
end do
end do
write(*,*) A1,B1
stop
end program sample