#include <iostream>
#include <cstring>

using namespace std;

int road[200005][2];

bool to[200005];

int main()
{
	int n,m;
	cin>>n>>m;
	
	memset(road,0,sizeof road);
	memset(to,0,sizeof to);
	for(int i=0;i<m;i++)
	{
		cin>>road[i][0]>>road[i][1];
		if(road[i][0]==1) to[road[i][1]]=1;
	}
	for(int i=0;i<m;i++)
	{
		if(to[road[i][0]] && road[i][1]==n)
		{
			cout<<"POSSIBLE"<<endl;
			return 0;
		}
	}
	cout<<"IMPOSSIBLE"<<endl;
	return 0;
}