#include #include #include using namespace std; #define MAX 120000 vector wl(MAX, true); void makewl(int n, int k ) { for( int i = 2; i <= n; i++ ) { if( i <= k+1 ) { wl[i] = true; continue; } bool f = false; for( int j = 1; j <= k; j++ ) { if( wl[ i - j ] == false ) { f = true; break; } } if( f ) { wl[i] = true; } else { wl[i] = false; } } } bool check( int N,int K ) { return true; } int main() { int P, N, K; cin >> P; for( int i = 0; i < P; i++ ) { cin >> N >> K; makewl( N, K ); if( wl[N]) { cout << "Win" << endl; } else { cout << "Lose" << endl; } } return 0; }