#include <stdio.h>
#include <stdlib.h>
#include <bitset>
#include <algorithm>
using namespace std;

int n,m,i,j,k,u,v;
bitset<200005> B1,B2;

int main()
{
	scanf("%d%d",&n,&m);
	for(;m;--m)
	{
		scanf("%d%d",&u,&v);
		if(u>v)swap(u,v);
		if(u==1)B1[v]=1;
		if(v==n)B2[u]=1;
	}
	if((B1&B2).count())printf("POSSIBLE\n");
	else printf("IMPOSSIBLE\n");
}