#include <iostream>
#include <cstring>
using namespace std;
int a[200005];
int b[200005];
bool vis[200005];
int main(){
	int N,M,i;
	cin>>N>>M;
	memset(vis,false,sizeof(vis));
	for(i=0;i<M;i++){
		cin>>a[i]>>b[i];
		if(a[i]==1)
			vis[b[i]]=true;
	}
	for(i=0;i<M;i++){
		if(b[i]==N){
			if(vis[a[i]]==true){
				cout<<"POSSIBLE"<<endl;
				break;
			}
		}
	}
	if(i==M)
		cout<<"IMPOSSIBLE"<<endl;
	return 0;
} 