#import <Foundation/Foundation.h>
int main() {
    @autoreleasepool {
        NSMutableArray *a1 = [NSMutableArray array];
        NSMutableArray *aN = [NSMutableArray array];
        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>b) {
                long tmp = a;
                a = b;
                b = tmp;
            }
            if (a==1) {
                if ([aN containsObject:@(b)]) {
                    printf("POSSIBLE");
                    return 0;
                }
                [a1 addObject:@(b)];
            }
            if (b==N) {
                if ([a1 containsObject:@(a)]) {
                    printf("POSSIBLE");
                    return 0;
                }
                [aN addObject:@(a)];
            }
        }
    }
    printf("IMPOSSIBLE");
}

