/*

#include<iostream>
#include<cmath>
#include<algorithm>
#include<iomanip>
#include<string>
#include<vector>
#include<cstdio>
#include<cstring>
#include<map>
#include<set>
#include<fstream>
#include<sstream>
#include<queue>
#include<iterator>
#include<stack>

using namespace std;

#define st first
#define nd second
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define REV(a) reverse(a.begin(),a.end())
#define SORT(a) sort(a.begin(),a.end())
#define inf (int)1e9
#define linf (long long)1e18

typedef long long ll;
typedef short int si;
typedef pair<int,int> pii;
typedef pair<ll,int> pli;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<pli> vpli;

set<string> hav;

char tak[5]={'a','b','c','d','e'};

int n,m;
int cnt;

void run3(string s){
		FOR(i,0,6){
				FOR(j,0,6){
						FOR(k,0,6){
								string sav;
								sav=s;
								int pos;
								pos=sav.find('?');
								if(i!=5)sav[sav.find('?')]=tak[i];
								else sav.erase(pos,pos);
								pos=sav.find('?');
								if(j!=5)sav[sav.find('?')]=tak[j];
								else sav.erase(pos,pos);
								pos=sav.find('?');
								if(k!=5)sav[sav.find('?')]=tak[k];
								else sav.erase(pos,pos);
								if(hav.find(sav)!=hav.end())cnt++;
						}
				}
		}
}
void run2(string s){
		FOR(i,0,6){
				FOR(j,0,6){
						string sav;
						sav=s;
						int pos;
						pos=sav.find('?');
						if(i!=5)sav[sav.find('?')]=tak[i];
						else sav.erase(pos,pos);
						pos=sav.find('?');
						if(j!=5)sav[sav.find('?')]=tak[j];
						else sav.erase(pos,pos);
						if(hav.find(sav)!=hav.end())cnt++;
				}
		}
}
void run1(string s){
		FOR(i,0,6){
				string sav;
				sav=s;
				int pos;
				pos=sav.find('?');
				if(i!=5)sav[sav.find('?')]=tak[i];
				else sav.erase(pos,pos);
				if(hav.find(sav)!=hav.end()){
						cnt++;
				}
		}
}

int main() {
		hav.clear();
		cin>>n>>m;
		FOR(i,0,n){
				string ss;
				cin>>ss;
				hav.insert(ss);
		}
		FOR(j,0,m){
				string ss;
				cin>>ss;
				int hahahaha=0;
				FOR(k,0,ss.size())if(ss[k]=='?')hahahaha++;
				cnt=0;
				if(hahahaha==3)run3(ss);
				else if(hahahaha==2)run2(ss);
				else run1(ss);
				cout<<cnt<<endl;
		}

		return 0;
}
*/
#include<iostream>
#include<cmath>
#include<algorithm>
#include<iomanip>
#include<string>
#include<vector>
#include<cstdio>
#include<cstring>
#include<map>
#include<set>
#include<fstream>
#include<sstream>
#include<queue>
#include<iterator>
#include<stack>

using namespace std;

#define st first
#define nd second
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define REV(a) reverse(a.begin(),a.end())
#define SORT(a) sort(a.begin(),a.end())
#define inf (int)1e9
#define linf (long long)1e18

typedef long long ll;
typedef short int si;
typedef pair<int,int> pii;
typedef pair<ll,int> pli;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<pli> vpli;

set<int> reach[200000];
vi espec;
int n,m;

int main() {
		cin>>n>>m;
		FOR(i,0,m){
				int a,b;
				cin>>a>>b;
				if(a==1)espec.push_back(b-1);
				else{
						reach[a-1].insert(b-1);
						swap(a,b);
						reach[a-1].insert(b-1);
				}
		}
		bool can=false;
		n--;
		FOR(i,0,espec.size()){
				int xx=espec[i];
				if(reach[xx].find(n)!=reach[xx].end()){
						can=true;
						break;
				}
		}
		if(can)cout<<"POSSIBLE\n";
		else cout<<"IMPOSSIBLE\n";





		return 0;
}


Measured memory_bytes: 28416