Yazan created a new game for us hopefully it's easy
You are given a binary grid with n rows and m columns. (each cell is $$$0$$$ or $$$1$$$), you can select one cell with value equal to $$$1$$$ and turn all its neighbors' value to $$$1$$$, you can only do this operation once (two cells are considered to be neighboring if they have a common edge or corner).
If you can turn all values to 1 print WIN otherwise print LOSE
| 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 |
In the above example we can select $$$cell(2,3)$$$ and turn all it's neighbors to $$$1$$$ so all values will be equal to $$$1$$$ ($$$cell(i,j)$$$ represent the cell in the i-th row and j-th column).
The first line contains two positive integers n and m ($$$ 1 \le n,m \le 500$$$) the number of rows and the number of columns, respectively.
The following $$$n$$$ lines contain $$$m$$$ integers each, the $$$j$$$-th element in the $$$i$$$-th line $$$a_{i,j}$$$ is the number written in the $$$j$$$-th cell of the i-th row ($$$ 0 \le a_{i,j} \le 1 $$$).
If you can turn all values to 1 print "WIN" (without quotes). Otherwise print "LOSE".
4 4 1 0 0 1 1 1 1 0 1 0 0 1 1 1 1 1
WIN
2 5 1 0 0 0 1 1 0 0 0 1
LOSE
| Name |
|---|


