// Original C++ solution (slower):
///Bismillahir Rahmanir Rahim

#include "bits/stdc++.h"



#define                           ll                          long long

#define                           int                         ll

#define                           fi                          first

#define                           si                          second

#define                           mp                          make_pair

#define                           pb                          push_back

#define                           pi                          pair<ll,ll>

#define                           clr(x)                      memset(x,0,sizeof(x));

#define                           f(i,l,r)                    for(int i=l;i<=r;i++)

#define                           rf(i,r,l)                   for(int i=r;i>=l;i--)

#define                           done(i)                     cout<<"done = "<<i<<endl;

#define                           show(x,y)                   cout<<x<<" : ";for(auto z:y)cout<<z<<" ";cout<<endl;

#define                           fast                        ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);



using namespace std;



const ll inf=1e18;

const int mod=1e9+7;

const int M=200005;

vector<int>adj[M];

 main()



{

    fast

    int n,m;

    cin>>n>>m;

    f(i,1,m)

    {

       int u,v;

       cin>>u>>v;

       adj[u].pb(v);

       adj[v].pb(u);

    }

    for(auto x:adj[1])

    {

        if(x!=n)

        {

            for(auto y:adj[x])

            {

                if(y==n)

                {

                    cout<<"POSSIBLE"<<endl;

                    return 0;

                }

            }

        }

    }

    cout<<"IMPOSSIBLE"<<endl;

    return 0;



}








































































// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

#define LL long long

#define PII pair<int,int>

#define PIL pair<int,LL>

#define PLI pair<LL,int>

#define PIII pair<int,PII>

#define PLL pair<LL,LL>

#define PLII pair<LL,PII>

#define VI vector<int>

#define VVI vector<VI>

#define VL vector<LL>

#define VVL vector<VL>

#define VPII vector<PII>

#define FF first

#define SS second

#define MP make_pair

#define PB push_back

#define all(x) x.begin(),x.end()

#define watch(x) cout<<(#x)<<" = "<<(x)<<'\n'

#define mset(a,v) memset(a,v,sizeof(a))

#define setp(x) cout<<fixed<<setprecision(x)

#define EPS 0.00000000001

#define PI acos(-1)

#define loop(i,b,n) for(int i=b;i<n;++i)

#define rev_loop(i,b,n) for(int i=b;i>=n;--i)

using namespace std;



const int MOD = 1e9 + 7;

const LL MX = 1e9;

const LL INF = 1e9;



void print_a(VI v)

{

    if(v.size()) cout<<v[0];

    loop(i,1,v.size()) cout<<' '<<v[i];

    cout<<'\n';

}



VVI init_vvi(int n, int m, int val)

{

    return VVI(n,VI(m,val));

}



VVL init_vvl(int n, int m, LL val)

{

    return VVL(n,VL(m,val));

}



int main()

{

    //ofstream out("output.txt");

    //ifstream in("input.txt");

    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);



    int n,m;

    cin>>n>>m;

    int u,v;



    VI g[n+1];

    loop(i,0,m)

    {

        cin>>u>>v;

        g[u].PB(v);

    }



    int f = 0;

    for(int u1 : g[1])

    {

        if(binary_search(all(g[u1]),n)) {f = 1; break;}

    }



    if(f) cout<<"POSSIBLE\n";

    else cout<<"IMPOSSIBLE\n";



    /*

    int t,n;

    cin>>t;

    while(t--)

    {

        cin>>n;

        int a[n];

        loop(i,0,n)

        {

            cin>>a[i];

        }

    }

    */



    /*

    int n;

    cin>>n;

    int a[n];

    loop(i,0,n)

    {

        cin>>a[i];

    }

    */



    /*

    cout<<ans<<'\n';



    if(f) cout<<"YES\n";

    else cout<<"NO\n";



    if(f) cout<<"Yes\n";

    else cout<<"No\n";

    */



    return 0;

}


// Fastest known solution for this problem: