eolymp
bolt
Try our new interface for solving problems
Problems

Root NIM

Root NIM

The game root NIM uses the next rules. There is a heap of n stones before two players. They take out the stones in turns. If the heap contains k stones, the player can take out of it any number of stones from 1 to int(sqrt(k)) inclusively. For example from the heap of 10 stones its possible to take 1, 2 or 3 stones. Losing a player is one who can't make a move.

By the given value of n determine whether the first player can win during regular play of both players.

Input

One number n (1n1012) - the number of stones in the heap.

Output

Print WIN if the first player wins and LOSE if the first player can't win.

Time limit 1 second
Memory limit 122.49 MiB
Input example #1
3
Output example #1
WIN
Input example #2
5
Output example #2
LOSE