#include <iostream>
#include <cstdio>
#define N 200005
using namespace std;

int n, m;
bool a[N];
int main()
{
	int i, t1, t2;
	cin >> n >> m;
	while (m--) {
		scanf("%d %d", &t1, &t2);
		if (t1 == 1 || t1 == n) {
			if (a[t2]) {cout << "POSSIBLE" << endl; return 0;}
			a[t2] = 1;
		}
		if (t2 == 1 || t2 == n) {
			if (a[t1]) {cout << "POSSIBLE" << endl; return 0;}
			a[t1] = 1;
		}
	}
    cout << "IMPOSSIBLE" << endl;
    return 0;
}