#include <iostream>
#include <cstdio>
using namespace std;

int n, m, t1, t2;
bool v[200005][2];
int main()
{
	int i;
	scanf ("%d %d", &n, &m);
	while (m--) {
		scanf ("%d %d", &t1, &t2);
		if (t2 == n) v[t1][1] = 1;
		if (t1 == 1) v[t2][0] = 1;
	}
	for (i = 2; i< n; i++) {
		if (v[i][0] && v[i][1]) {
			cout << "POSSIBLE";
			return 0;
		}
	}
	cout << "IMPOSSIBLE";
    return 0;
}
