#include <iostream>

using namespace std;

const int MAX_N = 2e5 + 5;

int has1 [MAX_N];
int hasn [MAX_N];

int main () {
  int n, m;
  cin >> n >> m;

  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;

    if (u > v) swap(u, v);
    if (u == 1) has1[v] = 1;
    if (v == n) hasn[u] = 1;
  }

  for (int i = 2; i < n; i++) {
    if (has1[i] && hasn[i]) {
      cout << "POSSIBLE" << endl;
      return 0;
    }
  }

  cout << "IMPOSSIBLE" << endl;
}
