#include <bits/stdc++.h>

using namespace std;

const int N = 2e5 + 10;

int n, m;
int x, y;
vector<int> edge[N];

int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> x >> y;
    if (x > y) swap(x, y);
    if (x == 1 || y == n) edge[x].push_back(y);
  }
  for (int v : edge[1]) {
    if (v != n && edge[v].size()) {
      cout << "POSSIBLE" << "\n";
      return 0;
    }
  }
  cout << "IMPOSSIBLE" << "\n";
  return 0;
}