Problem:
Score : 500 points

Problem Statement

Alice and Brown loves games. Today, they will play the following game.

In this game, there are two piles initially consisting of X and Y stones, respectively.
Alice and Bob alternately perform the following operation, starting from Alice:

Take 2i stones from one of the piles. Then, throw away i of them, and put the remaining i in the other pile. Here, the integer i (1≤i) can be freely chosen as long as there is a sufficient number of stones in the pile.

The player who becomes unable to perform the operation, loses the game.

Given X and Y, determine the winner of the game, assuming that both players play optimally.

Constraints

0 ≤ X, Y ≤ 10^{18}

Input

Input is given from Standard Input in the following format:

X Y

Output

Print the winner: either Alice or Brown.

Sample Input 1

2 1

Sample Output 1

Brown

Alice can do nothing but taking two stones from the pile containing two stones. As a result, the piles consist of zero and two stones, respectively. Then, Brown will take the two stones, and the piles will consist of one and zero stones, respectively. Alice will be unable to perform the operation anymore, which means Brown's victory.

Sample Input 2

5 0

Sample Output 2

Alice

Sample Input 3

0 0

Sample Output 3

Brown

Sample Input 4

4 8

Sample Output 4

Alice

Solution in C++14 (GCC 5.4.1) (judge verdict: Wrong Answer)

#include <bits/stdc++.h>
using namespace std;
/*{{{*/  //template
#define REP(i,n) for(int i=0;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define INF 1<<29
#define LINF LLONG_MAX/3
#define MP make_pair
#define PB push_back
#define pb push_back
#define EB emplace_back
#define ALL(v) (v).begin(),(v).end()
#define all(v) ALL(v)
#define sz(x) (int)(x).size()
#define debug(x) cerr<<#x<<":"<<x<<endl
#define debug2(x,y) cerr<<#x<<","<<#y":"<<x<<","<<y<<endl
//struct fin{ fin(){ cin.tie(0); ios::sync_with_stdio(false); } } fin_;
struct Double{ double d; explicit Double(double x) : d(x){} };
ostream& operator<<(ostream& os,const Double x){ os << fixed << setprecision(20) << x.d; return os; }
template<typename T> ostream& operator<<(ostream& os,const vector<T>& vec){ os << "["; for(const auto& v : vec){ os << v << ","; } os << "]"; return os; }
template<typename T,typename U> ostream& operator<<(ostream& os,const pair<T,U>& p){ os << "(" << p.first << ","<< p.second <<")"; return os; }
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
ll gcd(ll a,ll b){ if(b==0) return a; else return gcd(b,a%b); }
constexpr double eps = 1e-14; 
constexpr ll mod = 1e9+7;
const int dx[]={1,0,-1,0} ,dy[] = {0,1,0,-1};
/*}}}*/

ll X,Y;
string s[2] = {"Brown","Alice"};

map<pair<ll,ll>,bool> mp;

bool dfs(ll x,ll y,int turn){
    if(x%2==1 and y==0) return false;
    if(x==0 and y%2==1) return false;
    if(x%2==1 and y%2==1) return false;

    if(mp.count(make_pair(x,y))) return mp[make_pair(x,y)];

    int nturn = (turn+1)%2;

    if(x>1){   // use from x
        ll u = x/2;
        ll nx = x - u*2;
        ll ny = y + u;
//        cout << "call : (" << nx <<"," << ny << ")" << endl;
        if(!dfs(nx,ny,nturn)) return mp[make_pair(x,y)]=true;
        u = u - 1;
        if(u>0){
            nx = x - u*2;
            ny = y + u;
//            cout << "call : (" << nx <<"," << ny << ")" << endl;
            if(!dfs(nx,ny,nturn)) return mp[make_pair(x,y)]=true;
        }
    }
    if(y>1){
        ll u = y/2;
        ll nx = x + u;
        ll ny = y - u*2;
//        cout << "call : (" << nx <<"," << ny << ")" << endl;
        if(!dfs(nx,ny,nturn)) return mp[make_pair(x,y)]=true;
        u = u - 1;
        if(u>0){
            nx = x + u;
            ny = y - u*2;
//            cout << "call : (" << nx <<"," << ny << ")" << endl;
            if(!dfs(nx,ny,nturn)) return mp[make_pair(x,y)]=true;
        }
    }

    return mp[make_pair(x,y)]=false;
}

int main(){
    cin >> X >> Y;

    cout << s[dfs(X,Y,1)] << endl;
}