program main implicit none integer::x,y read(*,*)x,y ! x,x if(x==y)then print*,0 return end if ! x,0 if(y==0)then print*,1 return end if ! 0,x if(x==0)then print*,2 return end if !x,-x if(x+y==0)then print*,3 return end if print*,-1 end program