#include<bits/stdc++.h>
using namespace std;

const int maxN=200000+10;
int dp[maxN];

int main(){
	int n,m;
	cin>>n>>m;
	while(m--){
		int x,y;
		cin>>x>>y;
		if(x==n || x==1){
			if(dp[y]==0){
				dp[y]++;
			}
			else{
				cout<<"POSSIBLE";
				exit(0);
			}
		}
		else if(y==n || y==1){
			if(dp[x]==0){
				dp[x]++;
			}
			else{
				cout<<"POSSIBLE";
				exit(0);
			}
		}
	}
	cout<<"IMPOSSIBLE";
}