// In The Name Of Allah

// Mehrkish Makuei

#include <bits/stdc++.h>

using namespace std;

const int maxx = 2e5 + 20;

int a[maxx];

int main ()
{
    int n , m , jvb;
    bool flag = false;
    cin >> n >> m;
    for ( int i = 0; i < ( m * 2 ) - 1; i += 2 )
    {
        cin >> a[i] >> a[i + 1];
    }
    for ( int i = 0; i < ( m * 2 ) - 1; i += 2 )
    {
        if ( a[i] == 1 )
            jvb = a[i + 1];
        for ( int j = 0; j < ( m * 2 ) - 1; j += 2 )
        {
            if ( a[j] == jvb && a[j + 1] == n )
            {
                cout << "POSSIBLE" << endl;
                flag = true;
                break;
            }
            else
                continue;
        }
        if ( flag == true )
            break;
    }
    if ( flag == false )
        cout << "IMPOSSIBLE" << endl;
    return 0;
}
