#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const int inf = numeric_limits<int>::max() / 2;
const long double eps = 1e-9;
const long double pi = acos(-1);
template <typename T>
inline bool mineq(T& a, T b) {
  return (a > b) ? (a = b, 1) : 0;
}
template <typename T>
inline bool maxeq(T& a, T b) {
  return (a < b) ? (a = b, 1) : 0;
}
inline void solve(), read();
const string file = "";
signed main() {
  if (file != "") {
    freopen((file + ".in").c_str(), "r", stdin);
    freopen((file + ".out").c_str(), "w", stdout);
  }
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  read();
  solve();
  return 0;
}
const int MAXN = 2e5;
const int MAXK = 35;
int n, f;
vector<int> bp, wp, rp;
int good[MAXN];
bitset<MAXN> G[MAXK];
bitset<MAXN> P;
int g[MAXN];
void sieve() {
  for (int i = 2; i < MAXN; i++) {
    if (good[i] > 2) {
      good[i] = 0;
      continue;
    }
    good[i] = 1;
    for (int j = 2 * i; j < MAXN; j += i) {
      if (good[j] > 2) {
        continue;
      }
      ++good[j];
      if ((j / i) % i == 0) {
        ++good[j];
        if ((j / i / i) % i == 0) {
          ++good[j];
        }
      }
    }
  }
}
inline void solve() {
  sieve();
  good[f] = 0;
  for (int i = 0; i < MAXN; i++) {
    P[i] = !!good[i];
  }
  P[f] = 0;
  G[0] = P;
  for (int i = 1; i < MAXN; i++) {
    while (G[g[i]][i]) {
      ++g[i];
    }
    G[g[i]] |= P << i;
  }
  int gr = 0;
  for (int i = 0; i < n; i++) {
    gr ^= g[wp[i] - bp[i] - 1];
    gr ^= g[rp[i] - wp[i] - 1];
  }
  if (gr) {
    cout << "Alice"
         << "\n"
         << "Bob"
         << "\n";
  } else {
    cout << "Bob"
         << "\n"
         << "Alice"
         << "\n";
  }
}
inline void read() {
  cin >> n >> f;
  bp.resize(n), wp.resize(n), rp.resize(n);
  for (int i = 0; i < n; i++) {
    cin >> bp[i] >> wp[i] >> rp[i];
  }
}
