#include <iostream>
#include <vector>
#include <algorithm>
#include <string>

#define rep(i,n) for(int i=0;i<n;++i)

using namespace std;
int e[200005] = {};
int main() {
	int N, M;
	cin >> N >> M;

	bool f = false;
	rep(i, M)
	{
		int a, b;
		cin >> a >> b;
		if (a == 1 || b == N)
		{
			int n = a == 1 ? b : a;
			e[n] ++;
			if (e[n] > 1)
			{
				f = true;
			}
		}
	}

	if (f)
	{
		cout << "POSSIBLE" << endl;
	}
	else
	{
		cout << "IMPOSSIBLE" << endl;
	}
	return 0;
}