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

int main(){
	int N, M; cin >> N >> M;
	vector<int> graph_si(N, 0), graph_ie(N, 0);

	for(int i = 0; i < M; ++i){
		int a, b;
		cin >> a >> b;

		a--; b--;
		if(a == 0) graph_si[b] = 1;
		if(b == N-1) graph_ie[a] = 1;
	}

	for(int i = 1; i < N-1; ++i){
		if(graph_si[i] && graph_ie[i]){
			cout << "POSSIBLE" << endl;
			return 0;
		}
	}

	cout << "IMPOSSIBLE" << endl;

	return 0;
}
