#include<iostream>
using namespace std;
const int maxn=200010;
int a1[maxn],a2[maxn];
int n,m;
int main(){
	cin>>n>>m;
	for(int i=0;i<m;i++){
		int x,y;
		cin>>x>>y;
		if(x==1) a1[y]=1;
		if(y==n) a2[x]=1;
	}
	for(int i=2;i<n;i++){
		if(a1[i]&&a2[i]){
			cout<<"POSSIBLE"<<endl;
			return 0;
		}
	}
	cout<<"IMPOSSIBLE"<<endl;
	return 0;
}