Consider a game for two players playing alternatively. Both players show a certain number of fingers in each hand. Let X be the player that moves next, and let Y be the other player. Let a and b be the number of fingers shown by X, and let c and d be the number of fingers shown by Y. In each turn, these are the allowed moves:
⎧ ⎪ ⎨ ⎪ ⎩ |
|
⎧ ⎨ ⎩ |
|
⎧ ⎨ ⎩ |
|
Both players play perfectly. The first player to get to (0, 0) loses the game. A game that never ends is considered to be a draw.
Input
Input consists of several cases, each one with a, b, c and d, all between 0 and 4. Assume a + b > 0 and c + d > 0.
Output
For every case, tell if X will win, if X will lose, or if the game is a draw.
Input
2 4 0 3 1 0 4 0 0 1 0 1 3 0 2 3 3 3 0 4 1 1 1 1
Output
WIN WIN LOSE LOSE DRAW DRAW