#include<iostream>
using namespace std;


int main(){
  int N,M,a,b,memo[200100]={};
  cin>>N>>M;
  for(int k=0;k<M;k++){
    cin>>a>>b;
    if(a==1){
      memo[b]+=1;
      if(memo[b]==2){
        cout<<"POSSIBLE"<<endl;
        return 0;
      }
    }
    if(b==N){
      memo[a]+=1;
      if(memo[a]==2){
        cout<<"POSSIBLE"<<endl;
        return 0;
      }
    }
  }
  cout<<"IMPOSSIBLE"<<endl;
  return 0;
}
