import java.util.Arrays; import java.util.HashSet; import java.util.LinkedList; import java.util.Scanner; import java.util.Set; import java.util.TreeSet; public class Main { public static int grundy(int n, LinkedList primes, int[] memo){ if(memo[n] >= 0){ return memo[n]; } if(n == 1){ return memo[n] = 0; } TreeSet set = new TreeSet(); for(final int prime : primes){ if(n < prime){ break; } if(n % prime == 0){ set.add(grundy(n / prime, primes, memo)); if((n / prime) % prime == 0){ set.add(grundy(n / (prime * prime), primes, memo)); } } } for(int i = 0; ; i++){ if(!set.contains(i)){ return memo[n] = i; } } } public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int N = sc.nextInt(); final int MAX = 10000; int[] memo = new int[MAX + 1]; Arrays.fill(memo, -1); LinkedList primes = new LinkedList(); boolean[] is_prime = new boolean[MAX + 1]; Arrays.fill(is_prime, true); is_prime[0] = is_prime[1] = false; for(int i = 2; i <= MAX; i++){ if(is_prime[i]){ primes.add(i); for(int j = i * 2; j <= MAX; j += i){ is_prime[j] = false; } } } int grundy_number = 0; for(int i = 0; i < N; i++){ grundy_number ^= grundy(sc.nextInt(), primes, memo); } System.out.println(grundy_number == 0 ? "Bob" : "Alice"); } }