using static System.Math; using System.Linq; using System.Collections.Generic; using System; public class Hello { static void Main() { var n = int.Parse(Console.ReadLine().Trim()); string[] line = Console.ReadLine().Trim().Split(' '); var a = Array.ConvertAll(line, int.Parse); getAns(n, a); } static void getAns(int n, int[] a) { if (n == 1) { Console.WriteLine(a[0] == 1 ? "black" : "white"); return; } var s = GeneratePrime(100000); var w = new int[n]; for (int i = 0; i < n; i++) w[i] = calc(a[i], s); var x = w[0] ^ w[1]; for (int i = 2; i < n; i++) x ^= w[i]; Console.WriteLine(x == 0 ? "black" : "white"); } static int calc(int t, List s) { var p = 0; var count = 0; while (true) { if (t < s[p]) break; if (t % s[p] == 0) { t /= s[p]; count++; } else p++; } return count; } static List GeneratePrime(int m) { var a = new List(); int p; var sqrtMax = Sqrt(m); var s = Enumerable.Range(2, m - 1).ToList(); do { p = s.First(); a.Add(p); s.RemoveAll(n => n % p == 0); } while (p < sqrtMax); a.AddRange(s); return a; } }