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

int N, M; map<pair<int, int>, int>P;

int main() {
	cin >> N >> M;
	for (int i = 1; i <= M; i++) {
		int a, b; cin >> a >> b;
		P[make_pair(a, b)] = 1;
		P[make_pair(b, a)] = 1;
	}
	for (int i = 2; i <= N - 1; i++) {
		if (P[make_pair(1, i)] == 1 && P[make_pair(i, N)] == 1) { cout << "POSSIBLE" << endl; return 0; }
	}
	cout << "IMPOSSIBLE" << endl;
	return 0;
}