#include using namespace std; struct osa_k { private: std::vector spf, pr; public: osa_k() = default; osa_k(int MAX) : spf(MAX + 1) { for(int i = 2; i <= MAX; i++) { if(spf[i] == 0) { spf[i] = i; pr.push_back(i); } for(int j = 0; j < pr.size() and pr[j] <= spf[i] and i * pr[j] <= MAX; j++) spf[i * pr[j]] = pr[j]; } } std::vector> PF(int n) { std::vector> divisor; if(n == 1) return divisor; int before = spf[n], cnt = 0; while(n > 1) { if(spf[n] == before) { cnt++; n /= spf[n]; } else { divisor.emplace_back(before, cnt); before = spf[n]; cnt = 1; n /= spf[n]; } } divisor.emplace_back(before, cnt); return divisor; } int smallestprimefactor(const int n) const { return spf[n]; } bool isPrime(const int n) const { return n == spf[n]; } }; const int m = 1000000; osa_k pf(m); int main() { int n; cin >> n; int fold = 0; while(n--) { int a; cin >> a; if(a == 1) continue; auto vec = pf.PF(a); int tmp = 0; for(auto [val, cnt] : vec) tmp = max(tmp, cnt); fold ^= ((int)vec.size() == 1 ? tmp : tmp + 1); } cout << (fold ? "white" : "black") << '\n'; return 0; }