"use strict"
const create = () => {
    const input = require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n");
    const res = {
        "list": input, "index": 0, "max": input.length,
        "hasNext": function() {return this.index < this.max},
        "next": function() { if (!this.hasNext()) {throw "ArrayIndexOutOfBoundsException";}else{return this.list[this.index++];}}
    };
    return res;
}
const o = create();
const next = () => o.next()
const nextInt = () => parseInt(o.next())
const nextStrArray = () => o.next().split(" ")
const nextIntArray = () => o.next().split(" ").map(el => parseInt(el))
const nextCharArray = () => o.next().split("")
const hasNext = () => o.hasNext()
const myout = (...x) => console.log(...x)
const Main = () => {
    let [n, m] = nextIntArray()
    let arr = []
    for(let i = 0 ;i < n; i++){
      arr.push([0,0])
    }
    while(hasNext()){
        let tmp = nextIntArray()
        if(tmp[0] == 1){
            arr[tmp[1]-1][0] = 1
        }
        if(tmp[0] == n){
            arr[tmp[1]-1][1] = 1
        }
        if(tmp[1] == 1){
            arr[tmp[0]-1][0] = 1
        }
        if(tmp[1] == n){
            arr[tmp[0]-1][1] = 1
        }
    }
    for(let el of arr){
        if(el[0] == 1 && el[1] == 1){
            console.log("POSSIBLE")
            return
        }
    }
    console.log("IMPOSSIBLE")
}
Main()

