A Strange Game#2406

A Strange Game

1 second
64 megabytes
Hard

Two players play a simple game on an n \times n board. The first player has one white piece, and the second player has one black piece. The players take turns, with the white player moving first.

The white player can move their piece one square in any of the four cardinal directions (left, right, up, or down). On their turn, the black player can also move in any of the four cardinal directions, but may choose to move their piece either one or two squares in that direction. The first player to capture their opponent's piece wins the game.

Determine the winner and the total number of half-moves (individual player turns) required for victory, assuming both players play optimally.

Input

The input file contains five numbers: (2 \leq n \leq 20), followed by the coordinates of the white and black pieces.

Output

Output WHITE if the white player wins, BLACK if the black player wins, or DRAW if the game ends in a draw. Here, is the total number of half-moves (each player's turns) taken until the end of the game.

Examples

Example 1

Loading
Loading