// tested by Hightail - https://github.com/dj3500/hightail
import std.stdio, std.string, std.conv, std.algorithm;
import std.range, std.array, std.math, std.typecons, std.container, core.bitop;
import std.datetime, std.bigint;

int n, m;
bool[] a;
bool[] b;

void main() {
    scan(n, m);

    a = new bool[](n + 1);
    b = new bool[](n + 1);

    int u, v;

    foreach (i ; 0 .. m) {
        scan(u, v);
        if (u == 1) a[v] = true;
        if (v == n) b[u] = true;
    }

    foreach (i ; 1 .. n) {
        if (a[i] && b[i]) {
            writeln("POSSIBLE");
            return;
        }
    }

    writeln("IMPOSSIBLE");
}



void scan(T...)(ref T args) {
    string[] line = readln.split;
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}


void fillAll(R, T)(ref R arr, T value) {
    static if (is(typeof(arr[] = value))) {
        arr[] = value;
    }
    else {
        foreach (ref e; arr) {
            fillAll(e, value);
        }
    }
}