
#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; }

浙公网安备 33010602011771号