#include<bits/stdc++.h>

using namespace std;
typedef long long ll;
int a[200001];
int b[200001];
int n,m;

bool check = false;


int main(){
    
    cin >> n >> m;
    int x,y;
    for(int i=0;i<m;++i){
        cin >> x >> y;
        if(x==1)a[y]=1;
        if(y==1)a[x]=1;
        if(x==n)b[y]=1;
        if(y==n)b[x]=1;
    }
    for(int i=1;i<=n;++i)if(a[i]==1&&b[i]==1)check=true;
    if(check)cout << "POSSIBLE" << endl;
    else cout << "IMPOSSIBLE" << endl;
    return 0;
}