Hackerman wants to know who is the better player between Bob and Alice with the help of a game.

The game proceeds as follows:
First, Alice throws a die and gets the number A
Then, Bob throws a die and gets the number B
Alice wins the game if the sum on the dice is a [prime number]; and Bob wins otherwise.

Given A and B, determine who wins the game.

------ Input Format ------ 

- The first line of input will contain a single integer T, denoting the number of test cases.
- The first and only line of each test case contains two space-separated integers A and B.

------ Output Format ------ 

For each test case, output on a new line the winner of the game: Alice or Bob.

Each letter of the output may be printed in either uppercase or lowercase, i.e, Alice, ALICE, AlIce and aLIcE will all be considered equivalent.

------ Constraints ------ 

$1 ≤ T ≤ 36$
$1 ≤ A ≤ 6$
$1 ≤ B ≤ 6$

----- Sample Input 1 ------ 
3
2 1
1 1
2 2

----- Sample Output 1 ------ 
Alice
Alice
Bob

----- explanation 1 ------ 
Test case $1$: $A = 2$ and $B = 1$. Their sum is $2+1 = 3$ which is a prime number, so Alice wins.

Test case $2$: $A = 1$ and $B = 1$. Their sum is $1+1 = 2$ which is a prime number, so Alice wins.

Test case $3$: $A = 2$ and $B = 2$. Their sum is $2 + 2 = 4$ which is not a prime number, so Bob wins.

Difficulty: EASY
Tags: Mathematics

Starter code:

Solutions:
for i in range(int(input())):
	(x, y) = map(int, input().split())
	sum = x + y
	f = 0
	for i in range(2, sum):
		if sum % i == 0:
			f = 1
	if f == 1:
		print('Bob')
	else:
		print('Alice')


def prime(n):
	if n < 2:
		return False
	for i in range(2, n):
		if n % i == 0:
			return False
			break
	return True
n = int(input())
for i in range(n):
	(a, b) = map(int, input().split())
	p = a + b
	if prime(p):
		print('Alice')
	else:
		print('Bob')


import math

def isprime(n):
	if n <= 1:
		return False
	elif n == 2:
		return True
	elif n % 2 == 0:
		return False
	i = 3
	while i <= math.sqrt(n):
		if n % i == 0:
			return False
		i += 2
	return True
t = int(input())
for tc in range(t):
	(a, b) = map(int, input().split())
	if isprime(a + b):
		print('Alice')
	else:
		print('Bob')


prime = [1, 2, 3, 5, 7, 11]
N = int(input())
for i in range(N):
	(a, b) = map(int, input().split())
	add = a + b
	if add in prime:
		print('Alice')
	else:
		print('Bob')


prime = [1, 2, 3, 5, 7, 11]
t = int(input())
for u in range(t):
	(A, B) = list(map(int, input().split()))
	if A + B in prime:
		print('Alice')
	else:
		print('Bob')


def checkPrime(x):
	c = 0
	for i in range(1, x + 1):
		if x % i == 0:
			c += 1
	if c == 2:
		return 1
	else:
		return 0
T = int(input())
for t in range(T):
	(A, B) = map(int, input().split())
	if checkPrime(A + B) == 1:
		print('Alice')
	else:
		print('Bob')


def fun(n):
	for I in range(2, int(n ** 0.5) + 1):
		if n % I == 0:
			return False
	else:
		return True
for I in range(int(input())):
	(m, n) = map(int, input().split())
	if fun(m + n):
		print('Alice')
	else:
		print('Bob')


T = int(input())
prime = 1
for i in range(T):
	(A, B) = map(int, input().split())
	n = A + B
	for i in range(2, int(n ** 0.5) + 1):
		if (A + B) % i == 0:
			prime = 0
			break
		else:
			prime = 1
	if prime == 1:
		print('Alice')
	else:
		print('Bob')


prime = [2, 3, 5, 7, 11]
t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	if a + b in prime:
		print('Alice')
	else:
		print('Bob')


prime = [1, 2, 3, 5, 7, 11]
N = int(input())
for i in range(N):
	(A, B) = map(int, input().split())
	add = A + B
	if add in prime:
		print('Alice')
	else:
		print('Bob')


for _ in range(int(input())):
	(A, B) = map(int, input().split())
	prime = [2, 3, 5, 7, 11]
	if A + B in prime:
		print('Alice')
	else:
		print('Bob')


prime = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]
t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	add = a + b
	if add in prime:
		print('Alice')
	else:
		print('Bob')


for t in range(int(input())):
	(a, b) = map(int, input().split())
	flag = 0
	for i in range(2, a + b):
		if (a + b) % i == 0:
			flag = 1
			break
	if flag == 0:
		print('Alice')
	else:
		print('Bob')


prime_numbers = [2, 3, 5, 7, 11]
for i in range(int(input())):
	(a, b) = map(int, input().split())
	add = a + b
	if add in prime_numbers:
		print('Alice')
	else:
		print('Bob')


T = int(input())
for i in range(T):
	(A, B) = map(int, input().split())
	C = A + B
	if C == 2 or C == 3 or C == 5 or (C == 7) or (C == 11):
		print('Alice')
	else:
		print('Bob')


for _ in range(int(input())):
	(x, y) = list(map(int, input().split()))
	print('Alice') if x + y in [2, 3, 5, 7, 11] else print('Bob')


prime = [1, 2, 3, 5, 7, 11]
n = int(input())
for i in range(n):
	(a, b) = map(int, input().split())
	c = a + b
	if c in prime:
		print('Alice')
	else:
		print('Bob')


t = int(input())
li = [2, 3, 5, 7, 11]
for i in range(t):
	(x, y) = map(int, input().split())
	a = x + y
	if a in li:
		print('Alice')
	else:
		print('Bob')


prime = [1, 2, 3, 5, 7, 11]
t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	s = a + b
	if s in prime:
		print('Alice')
	else:
		print('Bob')


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	sum = a + b
	c = 0
	for j in range(2, sum):
		if sum % j == 0:
			c = c + 1
	if c == 0:
		print('Alice')
	else:
		print('Bob')


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	s = a + b
	f = 1
	for j in range(2, s):
		if s % j == 0:
			f = 0
			break
	if s == 2 or f == 1:
		print('Alice')
	else:
		print('Bob')


for i in range(int(input())):
	(a, b) = map(int, input().split())
	d = a + b
	c = 0
	for i in range(1, d + 1):
		if d % i == 0:
			c += 1
	if c == 2:
		print('Alice')
	else:
		print('Bob')


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	add = a + b
	p = [2, 3, 5, 7, 11]
	if add in p:
		print('Alice')
	else:
		print('Bob')


tc = int(input())
x = [2, 3, 5, 7, 11]
for i in range(tc):
	(a, b) = map(int, input().split())
	sum = a + b
	if sum in x:
		print('Alice')
	else:
		print('Bob')


for i in range(int(input())):
	(a, b) = input().split()
	a = int(a)
	b = int(b)
	f = 0
	for j in range(2, a + b):
		if (a + b) % j == 0:
			f = 1
	if f == 1:
		print('Bob')
	else:
		print('Alice')


T = int(input())
for _ in range(T):
	ans = 'Alice'
	line = input().split(' ')
	A = int(line[0])
	B = int(line[1])
	C = A + B
	i = 2
	while i * i <= C:
		if C % i == 0:
			ans = 'Bob'
		i += 1
	print(ans)


T = int(input())
X = 2
for _ in range(T):
	Answer = 'Alice'
	i = 2
	line = input().split(' ')
	A = int(line[0])
	B = int(line[1])
	C = A + B
	for i in range(2, C):
		if C % i == 0:
			Answer = 'Bob'
	print(Answer)


prime = [2, 3, 5, 7, 11]
t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	sum = x + y
	if sum in prime:
		print('Alice')
	else:
		print('Bob')


def isPrime(n):
	flag = False
	i = 2
	while i < n:
		if n % i == 0:
			flag = True
			break
		i = i + 1
	if flag:
		return 'Bob'
	else:
		return 'Alice'
n = int(input())
for i in range(0, n):
	(a, b) = map(int, input().split())
	c = a + b
	print(isPrime(c))


def is_prime(n):
	if n < 2:
		return False
	for i in range(2, n):
		if n % i == 0:
			return False
	return True
t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	if is_prime(a + b):
		print('Alice')
	else:
		print('Bob')


import math

def isPrime(n):
	if n == 2:
		return True
	elif n > 1:
		for i in range(2, int(math.sqrt(n)) + 1):
			if n % i == 0:
				return False
		else:
			return True
	else:
		return False
for i in range(int(input())):
	(a, b) = map(int, input().split())
	if isPrime(a + b):
		print('Alice')
	else:
		print('Bob')


T = int(input())
for i in range(T):
	(a, b) = map(int, input().split())
	k = a + b
	for i in range(2, k):
		if k % i == 0:
			print('Bob')
			break
	else:
		print('Alice')


n = int(input(''))
j = 0
while j < n:
	win = 'Alice'
	n1 = input('')
	(a, b) = map(int, n1.split())
	num = a + b
	if num > 1:
		for i in range(2, num // 2 + 1):
			if num % i == 0:
				win = 'Bob'
				break
			else:
				win = 'Alice'
	else:
		win = 'Bob'
	j += 1
	print(win)


def isPrime(a):
	for i in range(2, int(a ** 1 / 2) + 1):
		if a % i == 0:
			return False
	return True
t = int(input())
while t > 0:
	(a, b) = map(int, input().split())
	if isPrime(a + b):
		print('Alice')
	else:
		print('Bob')
	t -= 1


import math

def is_prime(n):
	if n < 2:
		return False
	if n == 2:
		return True
	if n % 2 == 0:
		return False
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		if n % i == 0:
			return False
	return True
t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	if is_prime(a + b):
		print('Alice')
	else:
		print('Bob')