#include <iostream>
using namespace std;

int n, m;
bool c[2][200001];

int main() {
	cin >> n >> m;

	for (int i = 0; i < m; i++) {
		int a, b;
		cin >> a >> b;
		if (a == 1)c[0][b] = true;
		else if (a == n)c[1][b] = true;

		if (b == 1)c[0][a] = true;
		else if (b == n)c[1][a] = true;
	}

	bool flag = false;
	for (int i = 2; i < n; i++) {
		if (c[0][i] && c[1][i])flag = true;
	}

	if (flag) {
		cout << "POSSIBLE" << endl;
	}
	else {
		cout << "IMPOSSIBLE" << endl;
	}
}