#include <iostream>
using namespace std;
bool solve(int a,int b);
int a,b;
int main(){
while(cin>>a>>b){
if(a == 0 && b == 0)
return 0;
if(a >= b){
if(solve(a,b))
cout<<"win"<<endl;
else
cout<<"lose"<<endl;
}
else{
if(solve(b,a))
cout<<"win"<<endl;
else
cout<<"lose"<<endl;
}
}
return 0;
}
bool solve(int a,int b){
if(a / b >= 2 || b == 0 || a == b)
return true;
else
return !solve(b,a-b);
}