#include #include #include #include /* 21, 3 (e)17 (m)16 (e)15-13 (m)12 (e)11-9 (m)8 (e)7-5 (m)4 (e)3-1 22, 6 (e)15 (m)14 (e)13-8 (m)7 (e)6-1 23, 3 (e)19 (m)18 (e)17-15 (m)14 (e)13-11 (m)10 (e)9-7 (m)6 (e)5-3 (m)2 12, 5 (e)6 (m)5 5, 10 N, K (e)N-K-1 (m)N-K-2 (e)(N-K-3)-(N-2K-2) (m)N-2K-3 ... (e)y-x (m)x-1>0 */ bool game(int N, int K) //N => Lose, 1~K, N - K - 1 { int rest = N - K - 1; int i = 1; if(rest < 0) { return true; } rest -= 1; i ++; for(;rest > 0; i ++) { rest -= (K + 1); } rest += (K + 1); i--; if(rest < K + 1 && i % 2 == 0) { return true; } else { return false; } } int main(void) { int P; std::cin >> P; std::vector N(P); std::vector K(P); for(int i = 0; i < P; i ++) { std::cin >> N[i] >> K[i]; } for(int i = 0; i < P; i ++) { if(game(N[i], K[i])) { std::cout << "Win" << std::endl; } else { std::cout << "Lose" << std::endl; } } return 0; }