function Main(input) {
  	input = input.trim();
	var N = input.split("\n")[0].split(" ")[0];
  	var M = input.split("\n")[0].split(" ")[1];
  	var oneList = new Set();//1から行けるところのリスト
  	var NList = new Set();//Nから行けるところのリスト
  for(var i = 1; i <= M; i++){
    var tmp = input.split("\n")[i].split(" ").map((tmp)=>Number(tmp));
    if(tmp[0] == "1"){
       oneList.add(tmp[1]);
    }
    if(tmp[1] == N){
       NList.add(tmp[0]);
    }
  }
  if(oneList.length == 0 || NList.length == 0){
     console.log("IMPOSSIBLE");
  }else{
    for(i = 2; i < N; i++){
      if(oneList.has(i) != -1 && NList.has(i) != -1){
         	console.log("POSSIBLE");
        return;
      }
    }
    console.log("IMPOSSIBLE");
  }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
