Codeforces celebrates 10 years! We are pleased to announce the crowdfunding-campaign. Congratulate us by the link https://codeforces.com/10years.
×

Package for this problem was not updated by the problem writer or Codeforces administration after we’ve upgraded the judging servers. To adjust the time limit constraint, solution execution time will be multiplied by 2. For example, if your solution works for 400 ms on judging servers, then value 800 ms will be displayed and used to determine the verdict.

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

D. Yet Another Number Game

time limit per test

2 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputSince most contestants do not read this part, I have to repeat that Bitlandians are quite weird. They have their own jobs, their own working method, their own lives, their own sausages and their own games!

Since you are so curious about Bitland, I'll give you the chance of peeking at one of these games.

BitLGM and BitAryo are playing yet another of their crazy-looking genius-needed Bitlandish games. They've got a sequence of *n* non-negative integers *a*_{1}, *a*_{2}, ..., *a*_{n}. The players make moves in turns. BitLGM moves first. Each player can and must do one of the two following actions in his turn:

- Take one of the integers (we'll denote it as
*a*_{i}). Choose integer*x*(1 ≤*x*≤*a*_{i}). And then decrease*a*_{i}by*x*, that is, apply assignment:*a*_{i}=*a*_{i}-*x*. - Choose integer
*x*. And then decrease all*a*_{i}by*x*, that is, apply assignment:*a*_{i}=*a*_{i}-*x*, for all*i*.

The player who cannot make a move loses.

You're given the initial sequence *a*_{1}, *a*_{2}, ..., *a*_{n}. Determine who wins, if both players plays optimally well and if BitLGM and BitAryo start playing the described game in this sequence.

Input

The first line contains an integer *n* (1 ≤ *n* ≤ 3).

The next line contains *n* integers *a*_{1}, *a*_{2}, ..., *a*_{n} (0 ≤ *a*_{i} < 300).

Output

Write the name of the winner (provided that both players play optimally well). Either "BitLGM" or "BitAryo" (without the quotes).

Examples

Input

2

1 1

Output

BitLGM

Input

2

1 2

Output

BitAryo

Input

3

1 2 1

Output

BitLGM

Codeforces (c) Copyright 2010-2020 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Feb/24/2020 12:32:37 (f1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|