#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
bool js(int a,int b)
{
    if(a<b) swap(a,b);
    if(a%b==0) return true;
    for(int k=a/b;k>=1;k--)
        if(!js((a-b*k),b)) return true;
        return false;
}
int main()
{
    int a,b;
    while((cin>>a>>b)&&!(a==0&&b==0)){
        if(js(a,b)) cout<<"win"<<endl;
        else cout<<"lose"<<endl;
    }
    return 0;
 }

 

posted on 2023-05-12 17:23  禹城我的家  阅读(38)  评论(0)    收藏  举报