#include <bits/stdc++.h>
using std::cout;
using std::endl;
using std::cin;

int main(){
	int n, m; cin >> n >> m; std::vector<bool> li(n, false), li2(n, false);
	for(int i = 0; i < m; i++){
		int a, b; cin >> a >> b;
		if(a > b) std::swap(a, b);
		a--; b--;
		if(a == 0) li[b] = true;
		if(b == n - 1) li2[a] = true;
	}
	
	for(int i = 0; i < n; i++){
		if(li[i] and li2[i]){
			cout << "POSSIBLE" << endl;
			return 0;
		}
	}
	
	cout << "IMPOSSIBLE" << endl;
	return 0;
}
