#include <bits/stdc++.h>
using namespace std;
bool sortbyfir(const array<long long int, 2> &a,
               const array<long long int, 2> &b) {
  return (a[0] > b[0]);
}
long long int max3(long long int a, long long int b, long long int c) {
  return max(max(a, b), c);
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
bool inline isPrime(long long int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long int i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
bool isPowerOfTwo(long long int n) {
  if (!n) return false;
  return (ceil(log2(n)) == floor(log2(n)));
}
bool prtv(vector<long long int> e) {
  for (auto &i : e) cout << i << " ";
  cout << "\n";
}
void prt(int i) { i ? cout << "YES\n" : cout << "NO\n"; }
int getSum(int n) {
  int sum = 0;
  while (n != 0) {
    sum = sum + n % 10;
    n = n / 10;
  }
  return sum;
}
bool solve(long long int n, long long int k) {
  if (k % 3 != 0) return n % 3 != 0;
  n %= (k + 1);
  return n == k || n % 3 != 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int test = 1;
  cin >> test;
  while (test--) {
    long long int n, k;
    cin >> n >> k;
    cout << (solve(n, k) ? "Alice" : "Bob") << "\n";
  }
}
