#import <Foundation/Foundation.h>
int main() {
    @autoreleasepool {
        NSMutableSet *a1 = [NSMutableSet set];
        NSMutableSet *aN = [NSMutableSet set];
        long N,M;
        scanf("%ld %ld",&N,&M);
        for(long i=0;i<M;i++){
            long a,b;
            scanf("%ld %ld",&a,&b);
            if (a==1) {
                [a1 addObject:@(b)];
            }
            if (b==N) {
                [aN addObject:@(a)];
            }
        }
        printf([a1 intersectsSet:aN] ? "POSSIBLE" : "IMPOSSIBLE");
    }
}
