代码
#include <cstdio>
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
int ans;
int Check(int a,int b) {
ans++;
if(a==b){
if(ans%2==1) return 1;else return 0;
}
if(a/b>=2){
if(ans%2==1) return 1;else return 0;
}
return Check(min(a,b),max(a,b)-min(a,b));
}
int main() {
int a,b;
while(scanf("%d%d",&a,&b)!=EOF&&a!=0&&b!=0) {
if(a<b) swap(a,b);
if(b==0){
printf("lose\n");
continue;
}
ans=0;
if(Check(a,b)) printf("win\n");else printf("lose\n");
}
}