下面的代码已经在VC上验证了
#include<iostream>
#include<cmath>
using namespace std;
int n,m;
int main()
{
int n,m;
while (scanf("%d%d",&n,&m)!=EOF)
{
int s=0;
int a,b;
while (n--)
{
scanf("%d%d",&a,&b);
s=s^(abs(a-b)-1);
}
if (s==0) printf("BAD LUCK!n");
else printf("I WIN!n");
}
return 0;
}