Nini and Mimi are playing a game with N heaps of stones and pebbles. Each heap i has B_i big stones and S_i small pebbles. Nini and Mimi take turns performing moves and once a player has no more moves to do, they lose. Each move consists of choosing a non-empty heap 𝑖 and removing some stones and/or pebbles from it. Formally, one can remove X stones and Y pebbles, where 0≤X≤B_i, 0≤Y≤S_i and X+Y>0. However, every removed stone must be replaced with at least K pebbles; it can be replaced with any natural number of pebbles not less than K. Thus, in any move where X≥1, first Y pebbles are removed and then the player must add back Z≥KX pebbles, which are taken from an infinite supply of pebbles. Nini goes first. Before making her move she wonders whether she can win the game if she plays optimally. Write a program, which answers her question.
From the first line of the standard input, your program should read K and Q. Then Q independent tests with that K will follow. For each test, the first line contains N. The next N lines each have a desription of a heap: B_i and S_i.
On Q lines, your program should output the answers to each of the tests in the order they were given. It should print Win, if Nini can win, and Loss, otherwise.