#include<iostream>
#include<map>

using namespace std;

int main(){
	int n, m, ans = 0;
	cin >> n >> m;
    map<int, int> mp;
    for(int i = 0; i < m; i++){
        int x, y;
        cin >> x >> y;
        if(x == 1) mp[y]++;
        if(y == n) mp[x]++;
    }
    for(auto&& i : mp){
        if(i.second == 2){
            cout << "POSSIBLE" << endl;
            return 0;
        }
    }
	cout << "IMPOSSIBLE" << endl;
	return 0;
}
