#!/usr/bin/env python3 from collections import defaultdict from functools import lru_cache from itertools import count, takewhile def prime(): prime = [] def _isPrime(n): for d in takewhile(lambda x: x * x <= n, prime): if n % d == 0: return False return True for i in count(2): if _isPrime(i): prime.append(i) yield(i) @lru_cache(maxsize=None) def prime_factorization(n): factor = defaultdict(int) for p in takewhile(lambda x: x * x <= n, prime()): while n % p == 0: n //= p factor[p] += 1 if n > 1: factor[n] += 1 return factor @lru_cache(maxsize=None) def nim(nums): if sum(nums) == 0: True for i in range(len(nums)): for j in (2, 1): if nums[i] < j: continue tmp = list(nums) tmp[i] -= j tmp.sort(reverse=True) if nim(tuple(tmp)): return False return True N = int(input()) M = [int(x) for x in input().split()] init = [] for m in M: init.extend(prime_factorization(m).values()) init = [x % 3 for x in init] init.sort(reverse=True) if nim(tuple(init)): print("Bob") else: print("Alice")