#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, n, m;
  cin >> n >> m;
  vector<bool> vis(n + 1, false);
  bool ans = false;
  for (i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    if (a == 1) {
      if (vis[b]) {
        ans = true;
      }
      vis[b] = true;
    } else if (b == n) {
      if (vis[a]) {
        ans = true;
      }
      vis[a] = true;
    }
  }
  if (!ans)
    cout << "IMPOSSIBLE";
  else
    cout << "POSSIBLE";
  return 0;
}
