#include using namespace std; using Int = long long; const char newl = '\n'; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a void drop(const T &x){cout< vector read(size_t n){ vector ts(n); for(size_t i=0;i>ts[i]; return ts; } template struct FixPoint : F{ FixPoint(F&& f):F(forward(f)){} template decltype(auto) operator()(Args&&... args) const{ return F::operator()(*this,forward(args)...); } }; template inline decltype(auto) MFP(F&& f){ return FixPoint{forward(f)}; } //INSERT ABOVE HERE signed main(){ cin.tie(0); ios::sync_with_stdio(0); int T; cin>>T; while(T--){ int h,w; cin>>h>>w; using ll = long long; using T = tuple; map memo; int di[]={+1,+1,-1,-1,+2,+2,-2,-2}; int dj[]={+2,-2,+2,-2,+1,-1,+1,-1}; auto get_bit=[&](int i,int j){return 1LL<<(i*w+j);}; auto dfs=MFP([&](auto dfs,ll bit,int i,int j)->int{ if(memo.count(T(bit,i,j))) return memo.at(T(bit,i,j)); int& res=memo[T(bit,i,j)]; res=0; for(int k=0;k<8;k++){ int ni=i+di[k]; int nj=j+dj[k]; if(0<=ni and niint{ assert(h<=w); if(h==1) return 0; if(h==2){ int lf=c/2; int rg=(w-1-c)/2; return (lf%2==1 or rg%2==1); } if(h%2==0) return 1; if(w%2==0) return 1; return (r+c)%2; }; if(0){ for(int i=0;i>r>>c; r--;c--; if(h>w) swap(h,w),swap(r,c); cout<<(calc(r,c)?"Alice":"Bob")<