#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define _USE_MATH_DEFINES #include typedef long long ll; using namespace std; //素因数分解 void factoring(ll n, map& mp) { for (ll i = 2; i * i <= n; i++) { while (n % i == 0) { mp[i]++; n /= i; } } if (n != 1) mp[n]++; } //絶対値 template> U SafeAbs( T x ) { return x < 0 ? -static_cast(x) : x; } //最大・最小 template inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } template inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } //xのn乗 ll mod_pow(ll x, ll n, ll mod) { ll res = 1; while (n > 0) { if (n & 1) res = res * x % mod; x = x * x % mod; n >>= 1; } return res; } //xの逆元 ll mod_inv(ll x, ll mod) {//O(log(mod)) return mod_pow(x, mod - 2, mod); } //nCr ll ncr(ll n, ll r, ll mod){ ll res=1; ll num=1,den=1; for(ll i=n;i>=n-r+1;i--){ (den*=i)%=mod; } for(ll i=1;i<=r;i++){ (num*=i)%=mod; } res=den*mod_inv(num,mod); return res%mod; } //二分探索 bool isOk(ll index, ll key,vector &a){ if(a[index]>key){ return true; } return false; } ll bin_search(ll key, vector &a){ ll l=-1; ll r=a.size(); while(abs(r-l)>1){ ll mid = (l+r)/2; if(isOk(mid, key, a)){ r=mid; } else{ l=mid; } } return r; } /* //深さ優先探索 void dfs(vector> &gra,vector &seen, ll v){ seen[v]=true; for(auto next : gra[v]){ if(seen[next]){ continue; } dfs(gra,seen,next); } } */ const ll MOD=1000000007; void solve(){ ll a,b; cin>>a>>b; if(b==0){ cout<<1<=0){ cout<<-1<