#include<bits/stdc++.h>
using namespace std;
const int MAX=20000;
int a[MAX], b[MAX];
int main(){
	int n ,m;
	cin>>n>>m;
	for(int i=0;i<m;i++){
		int x ,y;
		cin>>x>>y;
		if(x == 1)
			a[x]=1;
		if(y == n)
			b[y]=1;	
	}
	for(int i=2;i<n;i++){
		if(a[i]==b[i]){
			cout<<"POSSIBLE";
			exit(0);
		}
	}
	cout<<"IMPOSSIBLE";
}