#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void read(T &x) {
  x = 0;
  char c = getchar();
  bool flag = false;
  while (!isdigit(c)) {
    if (c == '-') flag = true;
    c = getchar();
  }
  while (isdigit(c)) {
    x = (x << 1) + (x << 3) + (c ^ 48);
    c = getchar();
  }
  if (flag) x = -x;
}
int n, m, tot, ans;
int p[200010], sg[200010];
bool tag[200010];
bitset<200010> f[110], g;
void init() {
  for (int i = 2; i <= 200000; ++i) {
    if (!tag[i]) p[++tot] = i, g[i] = 1;
    for (int j = 1; j <= tot; ++j) {
      int k = i * p[j];
      if (k > 200000) break;
      tag[k] = true;
      if (!tag[i]) g[k] = 1;
      if (i % p[j] == 0) break;
    }
  }
}
int main() {
  init(), read(n), read(m), g[m] = 0, f[0] = g;
  for (int i = 1; i <= 200000; ++i) {
    while (f[sg[i]][i]) sg[i]++;
    f[sg[i]] |= g << i;
  }
  for (int i = 1; i <= n; ++i) {
    int a, b, c;
    read(a), read(b), read(c);
    ans ^= sg[b - a - 1], ans ^= sg[c - a - 1];
  }
  if (ans)
    puts("Alice"), puts("Bob");
  else
    puts("Bob"), puts("Alice");
  return 0;
}
