#include <bits/stdc++.h>
/*
#include <cstdio>
#include <cstring>
#include <queue>
#include <set>
#include <vector>
#include <cmath>
#include <algorithm>
 */
using namespace std;
#define LSON            id << 1 , l , mid
#define RSON            id << 1 | 1 , mid + 1 , r
#define LS              id << 1
#define RS              id << 1 | 1
#define ROOT            1 , 1 , n
#define CLR(x , y)      memset(x , y , sizeof(x))
#define LOWBIT(x)       x & (-x)
#define FORN(i , a , n)  for(int i = (a) ; i <= (n) ; ++i)
#define FORP(i , n , a)  for(int i = (n) ; i >= (a) ; --i)
#define CASE(x)		printf("Case %d: ", x)
#define CASE#(x) printf("Case #%d: " , x)
#define SFD(x)      scanf("%lf" , &x)
#define SFC(x)      scanf(" %c" , &x)
#define SFS(x)      scanf(" %s" , x)
#define SFI(x)      scanf("%d" , &x)
//#define SFL(x)      scanf("%lld" , &x)
#define SFI64(x)    scanf("%I64d" , &x)
#define PFF(x)         printf("%f" , x)
#define PFD(x)         printf("%lf" , x)
#define PFI(x)         printf("%d" , x)
#define PFC(x)         printf("%c" , x)
#define PFS(x)         printf("%s" , x)
#define PFI64(x)       printf("%I64d" , x)
//#define PFL(x)         printf("%lld" , x)
#define SPACE          printf(" ")
#define PUT            puts("")
#define TEST           printf("pass\n");
#define LPUP(i , j , k) for(int i = j ; i <= k ; ++i)
#define LPDW(i , j , k) for(int i = j ; i >= k ; --i)
#define PB(x)          push_back(x)
#define ALL(A)         A.begin(), A.end()
#define SZ(A)          int((A).size())
#define LBD(A, x)      (lower_bound(ALL(A), x) - A.begin())
#define UBD(A, x)      (upper_bound(ALL(A), x) - A.begin())
//#define LOCAL
static const double PI = acos(-1.0);
static const double EPS = 1e-8;
static const int SEED = 131;
static const int OO = 0X3fffffff;
typedef unsigned long long ULL;
typedef long long LL;
typedef double DB;
inline int read1()
{
    int x = 0;
    int f = 1 ; char ch = getchar();
    while (ch < '0' || ch > '9') {if (ch == '-') f = -1; ch = getchar();}
    while (ch >= '0' && ch <= '9') {x = (x << 1) + (x << 3) + (ch - '0'); ch = getchar();}
    x *= f;
    return x;
}

struct buf
{
	operator int()
	{
		int x = 0 , y = 0 , c = getchar();
		while(c < 48)
			y = c == 45 , c = getchar();
		while(c > 47)
			x = (x << 1) + (x << 3) + (c - 48) , c = getchar();
		return y ? -x : x;
	}
}read;



inline void write(int x)
{
    int y = 10 , len = 1;
	if(x < 0)
	{
		putchar('-');
		x = -x;
	}
    while(y <= x)
    {
        y *= 10;
        ++len;
    }
    while(len--)
    {
        y /= 10;
        putchar(x / y + 48);
        x %= y;
    }
}

/************************Little Pea****************************/

static const int MAXN = 2e5 + 10;
bool vis[MAXN];
int n , m;
int a , b;
bool flag;

int main()
{
#ifdef LOCAL
    freopen("G:\\desktop\\littlepea\\in.data" , "r" , stdin);
#endif
    scanf("%d%d" , &n , &m);
	for(int i = 1 ; i <= m ; ++i)
	{
		scanf("%d%d" , &a , &b);
		if(a > b)
			swap(a , b);
		if(a == 1)
		{
			if(vis[b])
				flag = 1;
			else
				vis[b] = 1;
		}
		if(b == n)
		{
			if(vis[a])
				flag = 1;
			else
				vis[a] = 1;
		}
	}
	if(flag)
		puts("POSSIBLE");
	else
		puts("IMPOSSIBLE");

#ifdef LOCAL
    fclose(stdin);fclose(stdout);
#endif
}


Measured memory_bytes: 384