#include #pragma GCC optimize("Ofast") using namespace std; //using Graph = vector>; using dou =long double; string yes="yes"; string Yes="Yes"; string YES="YES"; string no="no"; string No="No"; string NO="NO"; template inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define brep(n) for(int bit=0;bit<(1<= (int)0; i--) #define rrep(i,m,n) for(ll i = m; i < (ll)(n); i++) #define reprep(i,j,h,w) rep(i,h)rep(j,w) #define all(x) (x).begin(),(x).end() #define VEC(type,name,n) std::vector name(n);rep(i,n)std::cin >> name[i]; #define pb push_back #define pf push_front #define query int qq;std::cin >> qq;rep(qqq,qq) #define lb lower_bound #define ub upper_bound #define fi first #define se second #define itn int #define mp make_pair #define sum(a) accumulate(all(a),0ll) #define keta fixed< > name(m,vector (n,a)) #define vvvector(name,t,l,m,n,a) vector > > name(l, vector >(m, vector(n,a))); #define vvvvector(name,t,k,l,m,n,a) vector > > > name(k,vector > >(l, vector >(m, vector(n,a)) )); #define case std::cout <<"Case #" <() typedef long long ll; // typedef pair P; typedef pair PL; //typedef long long T; const int INF = 2000000000; const double dINF = 1000000000; const ll INF64 = 922337203685477580ll; const ll MOD = 1000000007ll; //const ll MOD = 67280421310721ll; const dou pi=3.141592653589793; //メモ //二次元配列のresizeのしかた //vv.resize(n); //for(size_t i=0; i> a>>b; if(a==0&&b!=0){ std::cout << -1<< std::endl; exit(0); } if(b==0){ std::cout << 1<< std::endl; exit(0); } if(a*b>0){ std::cout << -1 << std::endl; exit(0); } else if(b<0){ std::cout << -1 << std::endl; exit(0); }else{ if(a*-2==b){ std::cout << 2 << std::endl; } else std::cout << -1 << std::endl; } }