Problem:
Score : 300 points

Problem Statement

A game is played on a strip consisting of N cells consecutively numbered from 1 to N.

Alice has her token on cell A. Borys has his token on a different cell B.

Players take turns, Alice moves first.
The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1.
Note that it's disallowed to move the token outside the strip or to the cell with the other player's token.
In one turn, the token of the moving player must be shifted exactly once.

The player who can't make a move loses, and the other player wins.

Both players want to win. Who wins if they play optimally?

Constraints

2 \leq N \leq 100

1 \leq A < B \leq N

All input values are integers.

Input

Input is given from Standard Input in the following format:

N A B

Output

Print Alice if Alice wins, Borys if Borys wins, and Draw if nobody wins.

Sample Input 1

5 2 4

Sample Output 1

Alice

Alice can move her token to cell 3.
After that, Borys will be unable to move his token to cell 3, so he will have to move his token to cell 5.
Then, Alice moves her token to cell 4. Borys can't make a move and loses.

Sample Input 2

2 1 2

Sample Output 2

Borys

Alice can't make the very first move and loses.

Sample Input 3

58 23 42

Sample Output 3

Borys

Solution in C++14 (GCC 5.4.1) (judge verdict: Runtime Error)

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template <class T> ll size(const T &x) { return x.size(); }
#define rep(i,a,b) for(ll i = (a); i < (b); i++)
#define iter(it,c) for(auto it = (c).begin(); it != (c).end();++it)
#define pb push_back
#define fs first
#define sc second
typedef pair<ll,ll> ii;
typedef vector<ll> vi;
typedef vector<ii> vii;

const ll INF = ~(1<<31);
const double pi = acos(-1);
const double EPS = 1e-9;

vi A;
ll n;

ll Get_mx() {
	reverse(A.begin(), A.end());
	vi Ne = {3};
	if(A[0] > 2) return -1;
	rep(i,0,n-1) Ne.pb(((Ne[i]/A[i+1])+1)*A[i+1]-1);
	reverse(Ne.begin(), Ne.end());
	reverse(A.begin(), A.end());
	rep(i,0,n) if(Ne[i] < A[i]) return -1;
	return Ne[0];
}

ll Get_mn() {
	reverse(A.begin(), A.end());
	ll mn = 2;
	vi Ne = {2};
	rep(i,0,n-1) {
		ll num = Ne[i];
		if(A[i+1] >= num) mn = A[i+1];
		else mn = (((Ne[i]/A[i+1])+1)*A[i+1]);
		Ne.pb(mn);
	}
	return mn;
}

int main() {
    cin.sync_with_stdio(false);
	cin >> n;
	A = vi(n);
	rep(i,0,n) cin >> A[i];
	if(A[n-1] > 2) cout << -1 << endl;
	else {
		ll mx = Get_mx();
		ll mn = Get_mn();
		if(mx == -1 || mn == -1) cout << -1 << endl;
		else cout << mn << " " << mx << endl;

	}
    return 0;
}