n,m=list(map(int,input().split()))

tr=[[] for i in range(n+1)]

for i in range(m):

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

  if a!=1 and b!=n:

    continue

  tr[a].append(b)

  tr[b].append(a)

for i in range(2,n):

  if len(tr[i])==2:

    print("POSSIBLE")

    break

else:

  print("IMPOSSIBLE")

import sys

input=sys.stdin.readline

n,m=list(map(int,input().split()))

tr=[[] for i in range(n+1)]

for i in range(m):

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

  if a!=1 and b!=n:

    continue

  tr[a].append(b)

  tr[b].append(a)

for i in range(2,n):

  if len(tr[i])==2:

    print("POSSIBLE")

    break

else:

  print("IMPOSSIBLE")

n, m = list(map(int, input().split()))
tr = [[] for i in range(n + 1)]
for i in range(m):
    a, b = list(map(int, input().split()))
    if a != 1 and b != n:
        continue
    tr[a].append(b)
    tr[b].append(a)
for i in range(2, n):
    if len(tr[i]) == 2:
        print("POSSIBLE")
        break
else:
    print("IMPOSSIBLE")

import sys

input = sys.stdin.readline
n, m = list(map(int, input().split()))
tr = [[] for i in range(n + 1)]
for i in range(m):
    a, b = list(map(int, input().split()))
    if a != 1 and b != n:
        continue
    tr[a].append(b)
    tr[b].append(a)
for i in range(2, n):
    if len(tr[i]) == 2:
        print("POSSIBLE")
        break
else:
    print("IMPOSSIBLE")

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