func_code_string: #include<bits/stdc++.h>   using namespace std;   typedef long long ll;   typedef unsigned long long ull;   #define pii pair<int,int>   #define fi first   #define se second   #define mp make_pair   #define poly vector<ll>   #define For(i,l,r) for(int i=(int)(l);i<=(int)(r);i++)   #define Rep(i,r,l) for(int i=(int)(r);i>=(int)(l);i--)   #define pb push_back   inline ll read(){    ll x=0; char ch=getchar(); bool d=1;    for(;!isdigit(ch);ch=getchar()) if(ch== - ) d=0;    for(;isdigit(ch);ch=getchar()) x=x*10+ch- 0 ;    return d?x:-x;   }   inline ull rnd(){    return ((ull)rand()<<30^rand())<<4|rand()%4;   }   const int N=1e5+5;   map<pii,bool> used;   map<int,int> id;   set<int> S;   poly v[N<<1],rv;   bool ans[N];   int q[N];   int main(){    int n=read(),m=read(),cnt=1;    used[mp(0,0)]=1; id[0]=1; rv.pb(0); v[1].pb(0);    For(i,1,n){     int x=read(),y=read();     if(!id[x]) id[x]=++cnt,rv.pb(x);     used[mp(x,y)]=1; v[id[x]].pb(y);    }    For(i,1,m){     int x=read(),y=read(); q[i]=y;     if(used[mp(x,y)]) continue;     if(!id[x]) id[x]=++cnt,rv.pb(x);     v[id[x]].pb(-i);    }    sort(rv.begin(),rv.end());    int pre=-1,ssw=0;    for(auto o:rv){     for(int i=pre+1;i<o;){      while(S.find(ssw)!=S.end()) ssw++;      auto ksg=S.upper_bound(ssw);      if(ksg==S.end()){       ssw+=o-i; break;      }      int t=min(*ksg-ssw,(int)o-i);      ssw+=t; i+=t;     }     int pos=id[o],mn=0x3f3f3f3f;     sort(v[pos].begin(),v[pos].end());     for(auto x:v[pos]) if(x>=0){      mn=x; break;     }     while(S.find(ssw)!=S.end()) ssw++;     if(ssw<mn) S.insert(ssw); mn=min(mn,ssw);     for(auto x:v[pos]){      if(x>=0) S.insert(x);      else ans[-x]=(q[-x]!=mn);     }     pre=o;    }    For(i,1,m) puts(ans[i]? WIN : LOSE );   }