//{{{By oToToT
// C
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif

// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

#if __cplusplus >= 201402L
#include <shared_mutex>
#endif
using namespace std;
/* include everything for Kotori~ <3 */

typedef long long lld;
typedef unsigned long long llu;
typedef double lf;
typedef long double llf;
typedef pair<int,int> PII;
typedef pair<lld,lld> PLL;
typedef pair<int,lld> PIL;
typedef pair<lld,int> PLI;
/* define some types for Ruby! */

#define F1(i,s,n) for(int i=s;i<int(n);i++)
#define F(i,s,n,k) for(int i=s;i!=int(n);i+=(k))
#define WC(a) while(a--)
/* make loop easier for Di~a~ */

#define FF first
#define SS second
#define SZ(x) ((int)((x).size()))
#define PB push_back
#define ALL(x) (x).begin(), (x).end()
/* define some weird thing for Ainyan~n~ */

#ifdef __linux__
#define gc getchar_unlocked
#elif _WIN32
#define gc getchar
#elif __APPLE__
#define gc getchar
#endif
template<typename T, class = typename is_integral<T>::type>
inline void GET(T &_){T __=1;char c=gc();_=0;while((c<'0'||c>'9')&&c!='-')c=gc();if(c=='-')__=-1,c=gc();while(c>='0'&&c<='9')_=_*10+c-'0',c=gc();_*=__;}
inline void GET(llf &_){llf __=1,___=0;char c=gc();_=0;while((c<'0'||c>'9')&&c!='-')c=gc();if(c=='-')__=-1,c=gc();while(c>='0'&&c<='9')_=_*10+c-'0',c=gc();if(c=='.'){c=gc();for(llf w=10;c>='0'&&c<='9';w*=10)___=___+(c-'0')/w,c=gc();}_+=___;_*=__;}
inline void GET(lf &_){lf __=1,___=0;char c=gc();_=0;while((c<'0'||c>'9')&&c!='-')c=gc();if(c=='-')__=-1,c=gc();while(c>='0'&&c<='9')_=_*10+c-'0',c=gc();if(c=='.'){c=gc();for(lf w=10;c>='0'&&c<='9';w*=10) ___=___+(c-'0')/w,c=gc();}_+=___;_*=__;}
inline void GET(float &_){float __=1,___=0;char c=gc();_=0;while((c<'0'||c>'9')&&c!='-')c=gc();if(c=='-')__=-1,c=gc();while(c>='0'&&c<='9')_=_*10+c-'0',c=gc();if(c=='.'){c=gc();for(float w=10;c>='0'&&c<='9';w*=10) ___=___+(c-'0')/w,c=gc();}_+=___;_*=__;}
inline void GET(char *_){char c=gc();while(c==' '||c=='\n'||c=='\t')c=gc();size_t __=0;for(_[__++]=c;c!=' '&&c!='\n'&&c!='\t'&&c!='\0';_[__++]=c)c=gc();_[__]='\0';}
inline void GET(string &_){char c=gc();while(c==' '||c=='\n'||c=='\t')c=gc();for(_.PB(c);c!=' '&&c!='\n'&&c!='\t'&&c!='\0';_.PB(c))c=gc();}
template <typename T, typename ...Args>
inline void GET(T &x, Args& ...args){GET(x);GET(args...);}
#undef gc
/* make reading quicker for Ma~ri~ <3 */

#ifdef __linux__
#define pc putchar_unlocked
#elif _WIN32
#define pc putchar
#elif __APPLE__
#define pc putchar
#endif
inline void SHOW(const int &a){printf("%d",a);};
inline void SHOW(const unsigned int &a){printf("%u",a);};
inline void SHOW(const llu &a){printf("%llu",a);};
inline void SHOW(const lld &a){printf("%lld",a);};
inline void SHOW(const lf &a){printf("%lf",a);};
inline void SHOW(const long &a){printf("%ld",a);};
inline void SHOW(const char a[]){for(size_t _=0;a[_]!='\0';_++)pc(a[_]);};
inline void SHOW(const char &a){pc(a);};
inline void SHOW(const bool &a){pc(a?'1':'0');};
template<typename A, typename B>
inline void SHOW(const pair<A,B>& a){pc('(');SHOW(a.FF);pc(',');pc(' ');SHOW(a.SS);pc(')');}
template<typename T,size_t N>
inline void SHOW(const array<T,N>& a){pc('[');for(auto _=a.cbegin();_!=a.cend();_++){if(_!=a.begin())pc(' ');SHOW(*_);}pc(']');}
template<typename T>
inline void SHOW(const vector<T> &a){pc('[');for(auto _=a.cbegin();_!=a.cend();_++){if(_!=a.begin())pc(' ');SHOW(*_);}pc(']');}
template <typename T, typename ...Args>
inline void SHOW(const T& x,const Args& ...args){SHOW(x);SHOW(args...);}
#undef pc
/* make showing things easier and quicker for Uchida Aya */

bool debug=0;
inline void DEBUG(const int &a){if(debug)fprintf(stderr,"%d",a);};
inline void DEBUG(const unsigned int &a){if(debug)fprintf(stderr,"%u",a);};
inline void DEBUG(const llu &a){if(debug)fprintf(stderr,"%llu",a);};
inline void DEBUG(const lld &a){if(debug)fprintf(stderr,"%lld",a);};
inline void DEBUG(const llf &a){if(debug)fprintf(stderr,"%Lf",a);};
inline void DEBUG(const lf &a){if(debug)fprintf(stderr,"%lf",a);};
inline void DEBUG(const long &a){if(debug)fprintf(stderr,"%ld",a);};
inline void DEBUG(const char a[]){if(debug)fprintf(stderr,"%s",a);};
inline void DEBUG(const char &a){if(debug)fprintf(stderr,"%c",a);};
inline void DEBUG(const bool &a){if(debug)fprintf(stderr,(a?"1":"0"));};
template<typename A,typename B>
inline void DEBUG(const pair<A,B>& a){DEBUG('(');DEBUG(a.FF);DEBUG(", ");DEBUG(a.SS);DEBUG(")");}
template<typename T,size_t N>
inline void DEBUG(const array<T,N> &a){DEBUG('[');for(auto _=a.cbegin();_!=a.cend();_++){if(_!=a.begin())DEBUG(' ');SHOW(*_);}DEBUG(']');}
template<typename T>
inline void DEBUG(const vector<T> &a){DEBUG('[');for(auto _=a.cbegin();_!=a.cend();_++){if(_!=a.begin())DEBUG(' ');SHOW(*_);}DEBUG(']');}
template <typename T, typename ...Args>
inline void DEBUG(const T& x,const Args& ...args){DEBUG(x);DEBUG(args...);}
/* Let's debug with Nico~Nico~Ni~ */
//}}}
const int N = 200000 + 5;
vector<int> G[N];
bitset<N> OK;

int main(int argc, char* argv[]){
	if(argc>1&&string(argv[1])=="-D") debug=1;
	int n, m;GET(n, m);
	for(int i=0;i<m;i++){
		int u, v;GET(u, v);
		G[u].PB(v);
		G[v].PB(u);
	}
	OK[1]=1;
	stack<int> qq;
	for(auto i:G[1]){
		qq.push(i);
		OK[i]=1;
	}
	while(!qq.empty()){
		int tp = qq.top();qq.pop();
		for(auto i:G[tp]) OK[i]=1;
	}
	SHOW((OK[n]?"POSSIBLE":"IMPOSSIBLE"), '\n');
	return 0;
}

Measured memory_bytes: 12400