#include <bits/stdc++.h>
using namespace std;
const int N = 205;
const int INF = 0x3f3f3f3f;
int sg[N][3][3];
int vis[N << 4];
pair<int, int> p[N];
int main() {
  ios ::sync_with_stdio(0);
  int n, m;
  cin >> n >> m;
  for (int i = (int)(1); i <= (int)(m); ++i) {
    cin >> p[i].first >> p[i].second;
    p[i].first--, p[i].second--;
  }
  sort(p + 1, p + m + 1);
  int ca = 0;
  for (int len = (int)(1); len <= (int)(n); ++len) {
    for (int left = 0; left < (int)(3); ++left) {
      for (int right = 0; right < (int)(3); ++right) {
        ca++;
        for (int move = 0; move < (int)(len); ++move) {
          for (int at = (int)(1); at <= (int)(2); ++at) {
            if (move == 0 && at + left == 3) continue;
            if (move == len - 1 && at + right == 3) continue;
            int tmp = sg[move][left][at] ^ sg[len - 1 - move][at][right];
            vis[tmp] = ca;
          }
        }
        for (int i = 0; i < (int)(INF); ++i)
          if (vis[i] < ca) {
            sg[len][left][right] = i;
            break;
          }
      }
    }
  }
  int pre = 0, left = 0, ans = 0;
  for (int i = (int)(1); i <= (int)(m); ++i) {
    int at = 0;
    if (p[i].second == 0) at = 1;
    if (p[i].second == 1) at = 2;
    ans ^= sg[p[i].first - pre][left][at];
    pre = p[i].first + 1;
    left = at;
  }
  ans ^= sg[n - pre][left][0];
  cout << (ans ? "WIN" : "LOSE") << endl;
  return 0;
}
