import std.stdio;
import std.conv, std.array, std.algorithm, std.string;
import std.math, std.random, std.range, std.datetime;
import std.bigint;
import std.container;
string read(){ static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res; }

void main(){
	long n = read.to!long;
	long m = read.to!long;
	
	bool[long] f1;
	bool[long] f2;
	
	foreach(i; 0 .. m){
		long a = read.to!long;
		long b = read.to!long;
		
		if(a == 1) f1[b] = 1;
		if(b == 1) f1[a] = 1;
		if(a == n) f2[b] = 1;
		if(b == n) f2[a] = 1;
		}
	
	string answer = "IMPOSSIBLE";
	foreach(i; 1 .. m + 1){
		if((i in f1) && (i in f2)) answer = "POSSIBLE";
		}
	
	answer.writeln;
	}