#include <bits/stdc++.h>
using namespace std;
const int kInf = 1000000000;
int gr[105][4][4];
int Solve(int len, int f, int s) {
  if (gr[len][f][s] != -1) {
    return gr[len][f][s];
  }
  bool was[105] = {};
  for (int i = 0; i < len; ++i) {
    for (int j = 0; j < 2; ++j) {
      if (f != 0 && i == 0) {
        continue;
      }
      if (s != 0 && i == len - 1) {
        continue;
      }
      if (f == 1 && j == 1 && i < 2) {
        continue;
      }
      if (f == 2 && j == 0 && i < 2) {
        continue;
      }
      if (s == 1 && j == 1 && i >= len - 2) {
        continue;
      }
      if (s == 2 && j == 0 && i >= len - 2) {
        continue;
      }
      was[Solve(i + 1, f, j + 1) ^ Solve(len - i, j + 1, s)] = true;
    }
  }
  for (int i = 0; i < 105; ++i) {
    if (!was[i]) {
      return gr[len][f][s] = i;
    }
  }
  return kInf;
}
int x[105];
int main() {
  memset(gr, -1, sizeof gr);
  int r, n;
  cin >> r >> n;
  for (int i = 0; i < n; ++i) {
    int f, s;
    cin >> f >> s;
    x[f - 1] = s;
  }
  int l = 0, h = 0, ret = 0;
  for (int i = 0; i < r; ++i) {
    if (x[i] != 0) {
      ret ^= Solve(i - h + 1, l, x[i]);
      h = i;
      l = x[i];
    }
  }
  ret ^= Solve(r - h, l, 0);
  if (ret) {
    cout << "WIN\n";
  } else {
    cout << "LOSE\n";
  }
  return 0;
}
