#include <bits/stdc++.h>
int status[110][3][3];
int R[110];
int r, n;
int sg(int len, int L, int R) {
  if (len == 0) return 0;
  if (status[len][L][R] != -1) return status[len][L][R];
  int res = 0;
  if (len == 1) {
    if (L == 0 || R == 0 || L == R) res = 1;
  } else {
    int s[210];
    int pt = 0;
    for (int i = 1; i <= len; ++i) {
      if (i == 1 && L)
        s[pt++] = sg(i - 1, L, L) ^ sg(len - i, L, R);
      else if (i == len && R)
        s[pt++] = sg(i - 1, L, R) ^ sg(len - i, R, R);
      else {
        s[pt++] = sg(i - 1, L, 1) ^ sg(len - i, 1, R);
        s[pt++] = sg(i - 1, L, 2) ^ sg(len - i, 2, R);
      }
    }
    while (true) {
      int i = 0;
      while (i < pt && s[i] != res) i++;
      if (i == pt) break;
      res++;
    }
  }
  status[len][L][R] = res;
  return res;
}
int main() {
  memset(status, -1, sizeof(status));
  scanf("%d%d", &r, &n);
  for (int i = 0; i < n; ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    R[a] = b;
  }
  int res = 0;
  int L = 0, pre = 0;
  int i = 1;
  while (i <= r) {
    while (R[i] == 0 && i <= r) i++;
    res ^= sg(i - pre - 1, L, R[i]);
    L = R[i];
    pre = i;
    i++;
  }
  res ^= sg(i - pre - 1, L, R[i]);
  puts(res ? "WIN" : "LOSE");
  return 0;
}
