Problem: Alice and Bob play a game on a grid with n rows and infinitely many columns. In each row, there are three tokens, blue, white and red one. Before the game starts and after every move, the following two conditions must hold: 

  * Any two tokens are not in the same cell. 
  * In each row, the blue token is to the left of the white token, and the red token is to the right of the white token. 



First, they pick a positive integer f, whose value is valid for the whole game. Second, the starting player is chosen and makes his or her first turn. Then players take alternating turns. The player who is unable to make a move loses. 

During a move, a player first selects an integer k that is either a prime number or a product of two (not necessarily distinct) primes. The smallest possible values of k are thus 2, 3, 4, 5, 6, 7, 9, 10, 11, 13, 14, 15, 17, 19, .... Furthermore, k must not be equal to the previously picked integer f. Each turn, a move is performed in exactly one of the rows.

If it is Alice's turn, she chooses a single blue token and moves it k cells to the right. Alternatively, she may move both the blue and the white token in the same row by the same amount k to the right.

On the other hand, Bob selects a single red token and moves it k cells to the left. Similarly, he may also move the white and the red token in the corresponding row by k to the left.

Note that Alice may never move a red token, while Bob may never move a blue one. Remember that after a move, the two conditions on relative positions of the tokens must still hold. 

Both players play optimally. Given the initial state of the board, determine who wins for two games: if Alice starts and if Bob starts. 

Input

The first line contains a two integers n and f (1 ≤ n ≤ 10^5, 2 ≤ f ≤ 2 ⋅ 10^5) — the number of rows and the forbidden move, respectively.

Each of the next n lines contains three integers b_i, w_i, r_i (-10^5 ≤ b_i < w_i < r_i ≤ 10^5) — the number of column in which the blue, white and red token lies in the i-th row, respectively. 

Output

Output two lines. 

The first line should contain the name of the winner when Alice starts, and the second line should contain the name of the winner when Bob starts.

Examples

Input


1 6
0 3 9


Output


Alice
Bob


Input


1 2
0 3 9


Output


Alice
Bob


Input


10 133
-248 -193 -187
97 101 202
-72 67 91
23 89 215
-129 -108 232
-223 -59 236
-99 86 242
-137 -109 -45
-105 173 246
-44 228 243


Output


Bob
Alice

Note

The first example is as follows:

When Alice starts, she can win by moving the blue and white token to right by 2 cells, getting into position 2~5~9. Regardless of what Bob does, Alice will have one more move and then the game is over. For instance, he can move both the red and white token by 2 cells to the left, reaching state 2~3~7. Alice can then move blue and white token by 2 to move into 4~5~7, where no more moves are possible.

If Bob starts, he gains enough advantage to win. For instance, he may move the red token by 3 to the left, getting into position 0~3~6. Alice can, for example, move the blue token by 2, which is countered by Bob by moving the red token by 2. The game ends in position 2~3~4. 

In the second example, it is forbidden to move by 2, but this doesn't stop Alice from winning! She can move the blue and white token by 4, getting into position 4~7~9. Now Bob has no move, since moving by 2 is forbidden.

Solution (in JAVA):

Solution:
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.StringTokenizer;

public class GB_18H {

	public static void main(String[] args) throws IOException {
		new GB_18H().main();
	}

	boolean[] prime = new boolean[200_006];

	ArrayList<Integer> primes = new ArrayList<Integer>();

	void main() throws IOException {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter printer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		StringTokenizer inputData = new StringTokenizer(reader.readLine());
		int N = Integer.parseInt(inputData.nextToken());
		int F = Integer.parseInt(inputData.nextToken());

		Arrays.fill(prime, true);
		for (int i = 2; i <= 200_005; i++) {
			if (prime[i]) {
				for (int m = i + i; m <= 200_005; m += i) {
					prime[m] = false;
				}
				primes.add(i);
			}
		}

		ArrayList<Integer> trans = new ArrayList<>(primes);

		for (int i = 0; i < primes.size(); i++) {
			for (int j = i; j < primes.size(); j++) {
				if ((long) primes.get(i) * primes.get(j) <= 200_005) {
					trans.add(primes.get(i) * primes.get(j));
				} else {
					break;
				}
			}
		}
		Collections.sort(trans);
		trans.remove(new Integer(F));

		BitSet transS = new BitSet(200_006);
		for (int a : trans) {
			transS.set(a);
		}

		BitSet[] nxS = new BitSet[101];
		for (int i = 0; i <= 100; i++) {
			nxS[i] = new BitSet(200_006);
		}

		int[] g = new int[200_006];
		for (int i = 0; i <= 200_005; i++) {
			int mex = 0;
			while (nxS[mex].isSet(i)) {
				mex++;
			}
			g[i] = mex;
			nxS[mex].ore(transS);
			transS.shiftL(1);
		}

		int xor = 0;
		for (int i = 0; i < N; i++) {
			inputData = new StringTokenizer(reader.readLine());
			int a = Integer.parseInt(inputData.nextToken());
			int b = Integer.parseInt(inputData.nextToken());
			int c = Integer.parseInt(inputData.nextToken());
			xor ^= g[b - a - 1];
			xor ^= g[c - b - 1];
		}
		if (xor == 0) {
			printer.println("Bob");
			printer.println("Alice");
		}
		else {
			printer.println("Alice");
			printer.println("Bob");
		}
		printer.close();
	}

	class BitSet {
		static final int MMASK = (1 << 6) - 1; // &MMASK == %64

		int nE;
		int lE;
		long[] a;

		BitSet(int size) {
			nE = (size + 63) >> 6;
			lE = size & MMASK;
			a = new long[nE];
		}

		void set(int ind) {
			a[ind >> 6] |= 1L << (ind & MMASK);
		}

		boolean isSet(int ind) {
			return (a[ind >> 6] & (1L << (ind & MMASK))) != 0;
		}

		void shiftL(int k) { // k < 64, can be extended by shifting k/64 first and then k%64
			long cMask = (1 << k) - 1;

			a[nE - 1] <<= k;

			for (int i = nE - 2; i >= 0; i--) {
				a[i + 1] |= (a[i] >>> (64 - k)) & cMask;
				a[i] <<= k;
			}

			a[nE - 1] &= (1 << lE) - 1;
		}

		void ore(BitSet o) {
			for (int i = 0; i < nE; i++) {
				a[i] |= o.a[i];
			}
		}
	}
}