#include<stdio.h>
#include<malloc.h>
int _2fun(int a[][2],int sta,int n,int m,int i,int b[],int judg)//i等于1 
{
	int j;
	if(i>2) return 0;
	for(j=0;j<m;j++)
	{
		if(judg==0&&a[j][0]==n&&a[j][1]==sta||a[j][1]==n&&a[j][0]==sta){printf("POSSIBLE");return 1;}
		
		if(judg==0&&a[j][0]==sta&&b[j]!=1) {b[j]=1;judg=_2fun(a,a[j][1],n,m,i+1,b,0);}
		                  
	    if(judg==0&&a[j][1]==sta&&b[j]!=1){b[j]=1;judg=_2fun(a,a[j][0],n,m,i+1,b,0);}
	}   return judg;
}
	                       
		
int main()
{
	int i,j, n,m,b[200000]={0,0};
	scanf("%d%d",&n,&m);
	int (*a)[2]=(int (*)[2])malloc( (m*2)*sizeof(int));//不同点在于强制类型转换
	for(i=0;i<m;i++)
	   for(j=0;j<2;j++)
	      scanf("%d",&a[i][j]);
	int judg=0;
	judg=_2fun(a,1,n,m,1,b,0);
	if(judg==0) printf("IMPOSSIBLE");
}