#include #include int main (void){ int white[8][8]; int black[8][8]; for (int i = 0; i < 8; i++){ for (int j = 0; j < 8; j++){ white[i][j] = -1; black[i][j] = -1; } } int w_x, w_y, b_x, b_y; scanf("%d %d\n%d %d", &w_x, &w_y, &b_x, &b_y); white[w_x][w_y] = 0; black[b_x][b_y] = 0; int moves = 64, w_score = 0, b_score = 0; for (int n = 0; n < moves; n++){ for (int i = 0; i < 8; i++){ for (int j = 0; j < 8; j++){ if (white[i][j] == n){ if (i - 2 > 0){ if (j + 1 < 8){ if (white[i-2][j+1] == -1) white[i-2][j+1] = n + 1; } if (j - 1 > 0){ if (white[i-2][j-1] == -1) white[i-2][j-1] = n + 1; } } if (i + 2 > 0){ if (j + 1 < 8){ if (white[i+2][j+1] == -1) white[i+2][j+1] = n + 1; } if (j - 1 > 0){ if (white[i+2][j-1] == -1) white[i+2][j-1] = n + 1; } } if (j - 2 > 0){ if (i + 1 < 8){ if (white[j-2][i+1] == -1) white[j-2][i+1] = n + 1; } if (i - 1 > 0){ if (white[j-2][i-1] == -1) white[j-2][i-1] = n + 1; } } if (j + 2 > 0){ if (i + 1 < 8){ if (white[j+2][i+1] == -1) white[j+2][i+1] = n + 1; } if (i - 1 > 0){ if (white[j+2][i-1] == -1) white[j+2][i-1] = n + 1; } } } } } } for (int n = 0; n < moves; n++){ for (int i = 0; i < 8; i++){ for (int j = 0; j < 8; j++){ if (black[i][j] == n){ if (i - 2 > 0){ if (j + 1 < 8){ if (black[i-2][j+1] == -1) black[i-2][j+1] = n + 1; } if (j - 1 > 0){ if (black[i-2][j-1] == -1) black[i-2][j-1] = n + 1; } } if (i + 2 > 0){ if (j + 1 < 8){ if (black[i+2][j+1] == -1) black[i+2][j+1] = n + 1; } if (j - 1 > 0){ if (black[i+2][j-1] == -1) black[i+2][j-1] = n + 1; } } if (j - 2 > 0){ if (i + 1 < 8){ if (black[j-2][i+1] == -1) black[j-2][i+1] = n + 1; } if (i - 1 > 0){ if (black[j-2][i-1] == -1) black[j-2][i-1] = n + 1; } } if (j + 2 > 0){ if (i + 1 < 8){ if (black[j+2][i+1] == -1) black[j+2][i+1] = n + 1; } if (i - 1 > 0){ if (black[j+2][i-1] == -1) black[j+2][i-1] = n + 1; } } } } } } for (int i = 0; i < 8; i++){ for (int j = 0; j < 8; j++){ if (white[i][j] == black[i][j]) b_score++; if (white[i][j] + 1 == black[i][j]) w_score++; } } if (w_score > b_score) printf("white\n"); else if (w_score < b_score) printf("black\n"); else printf("draw\n"); return 0; }