Chessboard
InterviewTime limit2sMemory limit512 MB
Given an m by n chessboard and the color of one cell, decide whether black, white, or neither appears more often.
- Level
Easy2 of 10
- Topics
- Math, Implementation, Brute force
- Solved
- No attempts yet
Problem
Anya divided a board of size into cells of size and colored them black and white in a chessboard pattern. Vasya wondered which color appeared more often on the board, black or white.
To find out, he asked Anya what color she had used for the cell in row , column of the board. From this information Vasya tried to determine which color appears more often on the board.
Given the size of the board and the color of the cell in row , column , write a program that determines which color appears more often on the board, black or white.
Input
The input file contains five integers: , , , , and (, , , or ). The value means that the cell in row , column of the board is colored black, and means it is colored white.
Output
The output file must contain one of three words:
- black, if the board has more black cells,
- white, if the board has more white cells,
- equal, if the board has the same number of black and white cells.