#include <bits/stdc++.h>
using namespace std;
#define FASTIO ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
typedef long long ll;
using pii = pair<int, int>;
const int N = 1000006;


int dp[N], cxor[N];

void pre_calc(int n) {
    for (int i = 1; i <= n; i++) {
        for (int j = i; j <= n; j += i) {
            dp[j]++;
        }
    }

    for (int i = 1; i <= n; i++) {
        cxor[i] = cxor[i - 1] ^ dp[i];
    }
}

int main()
{


    FASTIO

    int n = 1000000;
    pre_calc(n);
    int q;
    cin >> q;
    assert(q <= 100000);
    while (q--) {
        int l, r;
        cin >> l >> r;
        assert(l <= r);
        assert(l > 0 && r <= n);
        if ((cxor[r] ^ cxor[l - 1]) > 0)
            cout << "Alice\n";
        else cout << "Bob\n";
    }
}