#include<iostream>
using namespace std;

const int MAX = 200000;
int main() {
	int N, M, a, b;
	static int x[MAX];
	cin >> N >> M;
	for (int i = 0;i < N;i ++) x[i] = 0;
	for (int i = 0;i < M;i ++) {
		cin >> a >> b;
		if (a == 1) {
			x[b - 1] ++;
			if (x[b - 1] >= 2) {
				cout << "POSSIBLE";
				return 0;
			}
		} else if (b == N) {
			x[a - 1] ++;
			if (x[a - 1] >= 2) {
				cout << "POSSIBLE";
				return 0;
			}
		}
	}
	cout << "IMPOSSIBLE";
	return 0;
}