#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <stack>
#define ll long long
#define pii pair<int, int>
using namespace std;
int n,m;
int a1[200004],a2[200004];
int main()
{
    cin>>n>>m;int f=0;
    memset(a1,-1,sizeof(a1));
    for(int i=0;i<m;i++)
    {
        int x,y;
        cin>>x>>y;
        if(x==1 )
        {
            a1[y]=1;
        }
        else if(y == 1)
        {
            a1[x]=1;
        }
        else if (y==n)
        {
            a2[x]=1;
        }
        else if( x == n)
        {
            a2[y] = 1;
        }

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

  if(a2[1] || a1[n] == 1){
      cout<<"POSSIBLE" << endl;
            return 0;
       
  }
 cout<<"IMPOSSIBLE"<<endl;

    return 0;
}