#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 10;
const int mod = 1e9 + 7;
int n, k, t;
int main() {
  scanf("%d", &t);
  while (t--) {
    scanf("%d%d", &n, &k);
    int f = 1;
    if (n == 0) {
      printf("Bob\n");
      continue;
    }
    if (k == 3) {
      if (n % 4 == 0) f = 0;
    } else if (k % 3 != 0) {
      if (n % 3 == 0) f = 0;
    } else {
      if ((n % (k + 1)) % 3 == 0 && n % (k + 1) != k) f = 0;
    }
    if (f == 0)
      printf("Bob\n");
    else
      printf("Alice\n");
  }
}
