// Slower C++ solution:
#include <bits/stdc++.h>

#define FOR(i,a,b) for (int i = (a); i < (b); ++i)

#define RFOR(i,a,b) for (int i = (b)-1; i >= (a); --i)

#define REP(i,n) FOR(i,0,(n))

#define REPS(i,n) FOR(i,1,(n)+1)

#define RREP(i,n) RFOR(i,0,(n))

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

#define RALL(x) (x).rbegin(),(x).rend()

#define DEBUG(x)  cout << #x << " = " << (x) << endl;

#define SORT(x) sort(ALL(x));

#define RSORT(x) sort(RALL(x));

#define SUM(x) accumulate(ALL(x),0);

#define FI first

#define SE second

#define PB push_back

#define EB emplace_back

#define SZ(x) (int)(x).size()

#define BN(x) ((1<<x)-1)

#define DUP(x,y) (((x)+(y)-1)/(y))

using namespace std;

using ll = long long;

using vi = vector<int>;

using vvi = vector<vi>;

using vll = vector<ll>;

using pii = pair<int, int>;

using tiii = tuple<int, int, int>;

const ll mod = 1e9+7;

const int INF = (1<<30)-1;

const ll INFLL = (1LL<<62)-1;

const int dx[4] = {1,0,-1,0};

const int dy[4] = {0,1,0,-1};

//cout << fixed << setprecision(10);



template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }

template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }



ll gcd(ll a, ll b) { return b ? gcd(b,a%b) : a;}

ll lcm(ll a, ll b) { return a/gcd(a,b)*b;}



int N, M;

const int MAXN = 200005;

vi to[MAXN];



int main () {

  cin >> N >> M;

  REP(i,M) {

    int a, b;

    cin >> a >> b;

    a--, b--;

    to[a].push_back(b);

  }



  bool can = false;

  for (auto c : to[0]) {

    for (auto d : to[c]) {

      if (d == N-1) {

        can = true;

        break;

      }

    }

    if (can) break;

  }



  cout << (can ? "POSSIBLE" : "IMPOSSIBLE") << endl;

}

// Faster C++ solution for the same problem (measured speedup: 6.498035168588287x):
#include <bits/stdc++.h>

#define FOR(i,a,b) for (int i = (a); i < (b); ++i)

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

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

#define rrng(x) (x).rbegin(),(x).rend()

#define debug(x) cout << #x << " = " << (x) << endl;

#define fi first

#define se second

#define pb push_back

#define eb emplace_back

#define sz(x) (int)(x).size()

#define bn(x) ((1<<x)-1)

#define dup(x,y) (((x)+(y)-1)/(y))

#define uni(x) x.erase(unique(rng(x)),x.end())

#define SP << " " <<

using namespace std;

using ll = long long;

using vi = vector<int>;

using vvi = vector<vi>;

using vll = vector<ll>;

using pii = pair<int, int>;

using tiii = tuple<int, int, int>;

const int mod = 1000000007;

const double EPS = 1e-9;

const int INF = 1<<30;

const ll INFLL = 1LL<<60;

//cout << fixed << setprecision(10);



template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }

template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }



int main () {

  int n, m;

  cin >> n >> m;

  vvi to(n);

  rep(i,m) {

    int a, b;

    cin >> a >> b;

    a--, b--;

    to[a].pb(b);

    to[b].pb(a);

  }



  rep(i,to[0].size()) {

    int u = to[0][i];

    rep(j,to[u].size()) {

      if (to[u][j] == n-1) {

        puts("POSSIBLE");

        return 0;

      }

    }

  }

  puts("IMPOSSIBLE");

  return 0;

}