睡不着....
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int a, b;
bool dfs(int a, int b){
if(a / b >= 2 || a == b) return 1;
return !dfs(b, a-b);
}
int main(){
while(cin >> a >> b){
if (a == 0 && b == 0) break;
if(b > a) swap(a, b);
if(dfs(a, b)) cout << "win" << endl;
else cout << "lose" << endl;
}
return 0;
}