A. Alice and Bob
Http://codeforces.com/problemset/problem/346/A
Time limit per test
2 seconds
Memory limit per test
256 Megabytes
Input
Standard input
Output
Standard output
It is so boring in the summer holiday, isn ' t it? So Alice and Bob have invented a new game. The rules are as follows. The They get a set of n distinct integers. And then they take turns to make the following moves. During each move, either Alice or Bob (the player whose turn are the current) can choose two distinct integers x a nd y from the set, such this set doesn ' t contain their absolute difference | x-y|. Then this player adds integer | x-y| To the set (so, the size of the set increases by one).
If The current player has no valid move, he (or she) loses the game. The question is who would finally win the game if both players play optimally. Remember that Alice always moves.
Input
The "The" contains an integer n (2≤n≤100)-the Initial number of elements in the set. The second line contains n distinct space-separated integers a1,a2,..., a n (1≤ai≤109)-the elements of the set.
Output