#include using namespace std; #define rep(i,n) for(int i=0; i<(n); ++i) #define st first #define nd second #define pb push_back #define mp make_pair typedef vector vi; typedef pair pii; typedef long long ll; typedef long double ld; const int maxn = 1000 + 5; typedef array, 8> stan; stan pusty_stan() { stan s; rep (i, 8) rep(j, 8) s[i][j] = 0.0; return s; } bool in_range(int x) { return x >=0 && x < 8; } bool valid(int i, int j, int dx, int dy) { bool kon = ((abs(dx) == 2 && abs(dy) == 1) || (abs(dx) == 1 && abs(dy) == 2)); return kon && in_range(dx + i) && in_range(dy + j); } stan kolejny(const stan& obecny, const stan& drugi) { stan res = pusty_stan(); rep(i, 8) { rep(j, 8) { vector pos; for (int k = -2; k <= 2; k++) { for (int l = -2; l <= 2; l++) { if (!valid(i, j, k, l)) continue; pos.push_back({i + k, j + l}); } } ld ile = (ld)pos.size(); for (auto p : pos) { int x = p.first; int y = p.second; res[x][y] += obecny[i][j] * ((ld)1.0 - obecny[i][j] * drugi[i][j]) / ile; } } } return res; } pair go(int iter, stan& graczA, stan& graczB, ld wynikA, ld wynikB) { //printf("a: %Lf, b: %Lf\n", wynikA, wynikB); if (iter >= 60) { return {wynikA, wynikB}; } auto nowyA = kolejny(graczA, graczB); rep(i, 8) { rep(j, 8) { wynikA += nowyA[i][j] * graczB[i][j]; } } auto nowyB = kolejny(graczB, nowyA); rep(i, 8) { rep(j, 8) { wynikB += nowyA[i][j] * nowyB[i][j]; } } return go(iter + 1, nowyA, nowyB, wynikA, wynikB); } int main(){ int a, b; int p, q; scanf("%d %d %d %d", &a, &b, &p, &q); a--; b--; p--; q--; auto graczA = pusty_stan(); graczA[a][b] = 1.0; auto graczB = pusty_stan(); graczB[p][q] = 1.0; auto wynik = go(0, graczA, graczB, 0.0, 0.0); //printf("%Lf, %Lf\n", wynik.first, wynik.second); if (abs(wynik.first - wynik.second) < (ld)0.000001) { puts("draw"); } else if (wynik.first > wynik.second) { puts("white"); } else { puts("black"); } }