Alice and Bob are discussing penalty shoot-outs and how random they are. "We might as well be rolling dice to decide the winner!" Alice said. So they began simulating penalty shoot-outs: each of them rolls a set of dice, adds up the numbers shown, and the two sums are compared. The player with the larger sum wins; if the sums are equal, the result is a tie.
Even so, one player may still have an edge over the other, depending on which dice each of them rolls. Alice and Bob therefore want to determine who has the advantage simply by looking at the dice they are about to roll.
Alice has fair dice with a_1, a_2, \ldots, a_m sides. For all integers and such that 1 \le k \le m and 1 \le l \leq a_k, Alice's -th die shows the face numbered with probability 1/a_k. Alice's score is the sum of the numbers shown on her dice. Similarly, Bob has fair dice with b_1, b_2, \ldots, b_n sides.
With these dice, let p_a be the probability that Alice's score is strictly greater than Bob's, and let p_b be the probability that Bob's score is strictly greater than Alice's. Which of the two probabilities is larger?
The first line contains two integers and n~(1 \le m, n \le 10^5). The second line contains integers a_1, a_2, \ldots, a_m~(4 \leq a_k \leq 10^9 for 1 \le k \le m). The third line contains integers b_1, b_2, \ldots, b_n~(4 \le b_k \le 10^9 for 1 \le k \le n).
Print one word in uppercase: "ALICE" if p_a > p_b, "TIED" if p_a = p_b, or "BOB" if p_a < p_b.
Example 1
Example 2