#include <bits/stdc++.h>
using namespace std;

int main(){
  int n, m;
  int data[200020] = {};
  cin >> n >> m;
  int a, b;
  bool flag = false;
  for(int i = 0;i < m;i++){
    cin >> a >> b;
    if(a == 1){
      data[b]++;
      if(data[b] == 2){
        flag = true;
      }
    }else if(b == n){
      data[a]++;
      if(data[a] == 2){
        flag = true;
      }
    }
  }

  if(flag) cout << "POSSIBLE" << endl;
  else cout << "IMPOSSIBLE" << endl;

  return 0;
}