#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long n, k;
    cin >> n >> k;
    int flag = 1;
    if (k % 3 == 0) {
      if ((n % (k + 1) % 3) == 0 && (n % (k + 1)) != k) flag = 0;
    } else {
      if ((n % 3) == 0) flag = 0;
    }
    if (flag)
      cout << "Alice" << endl;
    else
      cout << "Bob" << endl;
  }
}
