N, M = list(map(int, input().split(" ")))

m = set()



for _ in range(M):

    a, b = list(map(int, input().split(" ")))

    if a < b:

        m.add((a,b))

    else:

        m.add((b,a))





for i in range(2, N):

    if (1, i) in m and (i, N) in m:

        print("POSSIBLE")

        break

else:

    print("IMPOSSIBLE")

import sys



input = sys.stdin.readline



N, M = list(map(int, input().split(" ")))

m = set()



for _ in range(M):

    a, b = list(map(int, input().split(" ")))

    if a < b:

        m.add((a,b))

    else:

        m.add((b,a))





for i in range(2, N):

    if (1, i) in m and (i, N) in m:

        print("POSSIBLE")

        break

else:

    print("IMPOSSIBLE")



N, M = list(map(int, input().split(" ")))
m = set()
for _ in range(M):
    a, b = list(map(int, input().split(" ")))
    if a < b:
        m.add((a, b))
    else:
        m.add((b, a))
for i in range(2, N):
    if (1, i) in m and (i, N) in m:
        print("POSSIBLE")
        break
else:
    print("IMPOSSIBLE")

import sys

input = sys.stdin.readline
N, M = list(map(int, input().split(" ")))
m = set()
for _ in range(M):
    a, b = list(map(int, input().split(" ")))
    if a < b:
        m.add((a, b))
    else:
        m.add((b, a))
for i in range(2, N):
    if (1, i) in m and (i, N) in m:
        print("POSSIBLE")
        break
else:
    print("IMPOSSIBLE")

+import sys + +input = sys.stdin.readline