#include #include #include #include using namespace std; int main(void){ long long n, m; cin >> n >> m; if(n == 2){ cout << "1" << endl; return 0; } if(n <= m){ cout << "1" << endl; }else{ cout << "-1" << endl; } return 0; }