#include <bits/stdc++.h>
using namespace std;
int gn[110][110];
int solve(int a, int b) {
  if (b > a) swap(a, b);
  if (a <= 0 && b <= 0) return 0;
  a = max(a, 0);
  b = max(b, 0);
  if (gn[a][b] != -1) return gn[a][b];
  vector<int> v;
  if (a == b) {
    int rbb = 1;
    int reb = b;
    for (int i = 0; i < a; i++) {
      v.push_back(solve(i, (i - 2) - (rbb) + 1) ^
                  solve(a - (i + 1), reb - (i + 2) + 1));
    }
    for (int i = rbb; i <= reb; i++) {
      v.push_back(solve(i - 2 + 1, (i - 1) - (rbb) + 1) ^
                  solve(a - 1 - (i + 2) + 1, reb - (i + 1) + 1));
    }
  } else if (a == b + 1) {
    int rbb = 0;
    int reb = b - 1;
    for (int i = 0; i < a; i++) {
      v.push_back(solve(i, (i - 2) - (rbb) + 1) ^
                  solve(a - (i + 1), reb - (i + 2) + 1));
    }
    for (int i = rbb; i <= reb; i++) {
      v.push_back(solve(i - 2 + 1, (i - 1) - (rbb) + 1) ^
                  solve(a - 1 - (i + 2) + 1, reb - (i + 1) + 1));
    }
  } else if (a == b + 2) {
    int rbb = 1;
    int reb = b;
    for (int i = 0; i < a; i++) {
      v.push_back(solve(i, (i - 2) - (rbb) + 1) ^
                  solve(a - (i + 1), reb - (i + 2) + 1));
    }
    for (int i = rbb; i <= reb; i++) {
      v.push_back(solve(i - 2 + 1, (i - 1) - (rbb) + 1) ^
                  solve(a - 1 - (i + 2) + 1, reb - (i + 1) + 1));
    }
  }
  sort(v.begin(), v.end());
  int x = 0;
  for (int i = 0; i < v.size();) {
    if (v[i] != x) {
      return gn[a][b] = x;
    }
    int pi = i + 1;
    while (pi < v.size() && v[pi] == v[i]) pi++;
    x++;
    i = pi;
  }
  return gn[a][b] = x;
}
pair<int, int> terras[110];
int main() {
  int n, m;
  scanf(" %d %d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf(" %d %d", &terras[i].first, &terras[i].second);
    terras[i].first--;
  }
  int ans = 0;
  memset(gn, -1, sizeof(gn));
  if (m == 0) {
    vector<int> v;
    int rbb = 0;
    int reb = n - 1;
    for (int i = 0; i < n; i++) {
      v.push_back(solve(i, i - 1) ^
                  solve(n - 1 - (i + 1) + 1, reb - (i + 2) + 1));
    }
    sort(v.begin(), v.end());
    int x = 0;
    for (int i = 0; i < v.size();) {
      if (v[i] != x) {
        break;
      }
      int pi = i + 1;
      while (pi < v.size() && v[pi] == v[i]) pi++;
      x++;
      i = pi;
    }
    ans = x;
  } else {
    sort(terras, terras + m);
    int la = 0;
    int lb = 0;
    for (int i = 0; i < m; i++) {
      if (terras[i].second == 1) {
        ans ^= solve((terras[i].first - 1) - la + 1,
                     (terras[i].first - 2) - lb + 1);
        la = terras[i].first + 1;
        lb = terras[i].first + 2;
      } else if (terras[i].second == 2) {
        ans ^= solve((terras[i].first - 2) - la + 1,
                     (terras[i].first - 1) - lb + 1);
        la = terras[i].first + 2;
        lb = terras[i].first + 1;
      }
    }
    ans ^= solve(n - la, n - lb);
  }
  if (ans > 0)
    printf("WIN\n");
  else
    printf("LOSE\n");
  return 0;
}
