#include <bits/stdc++.h>

using namespace std;
typedef pair <int, int> pii;

const int maxn = 200002;

int n,m,k,l,p;
vector <int> g[maxn];

void input();
bool solve();

int main(){
	input();
	if (solve()){
		cout<<"POSSIBLE";
	}
	else{
		cout<<"IMPOSSIBLE";
	}
	return 0;
}
void input(){
	cin >> n >> m;
	for (int i=0;i<m;i++){
		cin>>k>>l;
		g[k].push_back(l);
		g[l].push_back(k);
	}
	sort(g[1].begin(),g[1].end());
	sort(g[n].begin(),g[n].end());
}
bool solve(){
	for (int i=0;i<g[1].size();i++){
		while (g[n][p]<g[1][i]){
			p++;
		}
		if (g[n][p]==g[1][i]){
			return 1;
		}
	}
	return 0;
}