#include <iostream>
using namespace std;
int a, b;
int ans;
void dfs(int a, int b, int num)
{
if (a < b)
swap(a, b);
if (a / b >= 2)
{
ans = num;
return;
}
dfs(a - b, b, !num);
}
int main()
{
while (cin >> a >> b)
{
if (a == 0 && b == 0)
break;
ans = 1; // 先手赢 1 后手赢 0
dfs(a, b, 1);
cout << (ans == 1 ? "win\n" : "lose\n");
}
return 0;
}