#include <bits/stdc++.h>
using namespace std;
inline void prep() {
  cin.tie(0);
  cin.sync_with_stdio(0);
};
const double pi = acos(-1.);
int mod = 1000000007;
long long mymod(long long num) {
  if (num < 0 && !(abs(num) % mod == 0)) {
    if (mod == 1) {
      return 0;
      ;
    }
    return mod - abs(num) % mod;
  } else {
    return num % mod;
  }
}
double eps = .000000001;
int main() {
  prep();
  int tt;
  cin >> tt;
  for (int x = 0; x < tt; x++) {
    long long n, k;
    cin >> n >> k;
    if (k == 3) {
      if (n % 4 == 0) {
        cout << "Bob\n";
      } else {
        cout << "Alice\n";
      }
      continue;
    }
    if (k % 3 != 0) {
      if (n % 3 == 0) {
        cout << "Bob\n";
      } else {
        cout << "Alice\n";
      }
    } else {
      long long thing = 3 * (k / 3 - 1) + 4;
      if (n % thing == 0) {
        cout << "Bob\n";
      } else {
        if ((n % thing) % 3 == 0 && (n % thing) / 3 < k / 3) {
          cout << "Bob\n";
        } else {
          cout << "Alice\n";
        }
      }
    }
  }
  return 0;
}
