#ifndef LOCAL #include using namespace std; #define debug(...) (void(0)) #else #include "algo/debug.h" #endif void solve() { int A, B; cin >> A >> B; if(B == 0) { cout << 1 << endl; }else { if(A == -1) { cout << 2 << endl; }else { cout << -1 << endl; } } } int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); int tt = 1; // std::cin >> tt; while (tt--) { solve(); } }