read a b;echo $[b/a?1:~a&2*b/a?2:-1]