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



tree=[[] for i in range(n)]

for i in range(m):

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

  a-=1

  b-=1

  tree[a].append(b)

  tree[b].append(a)



for i in tree[0]:

  for j in tree[i]:

    if j==n-1:

      print('POSSIBLE')

      exit()

print('IMPOSSIBLE')
from sys import stdin

nii=lambda:list(map(int,stdin.readline().split()))



n,m=nii()



tree=[[] for i in range(n)]

for i in range(m):

  a,b=nii()

  a-=1

  b-=1

  tree[a].append(b)

  tree[b].append(a)



for i in tree[0]:

  for j in tree[i]:

    if j==n-1:

      print('POSSIBLE')

      exit()

print('IMPOSSIBLE')
n, m = list(map(int, input().split()))
tree = [[] for i in range(n)]
for i in range(m):
    a, b = list(map(int, input().split()))
    a -= 1
    b -= 1
    tree[a].append(b)
    tree[b].append(a)
for i in tree[0]:
    for j in tree[i]:
        if j == n - 1:
            print("POSSIBLE")
            exit()
print("IMPOSSIBLE")

from sys import stdin

nii = lambda: list(map(int, stdin.readline().split()))
n, m = nii()
tree = [[] for i in range(n)]
for i in range(m):
    a, b = nii()
    a -= 1
    b -= 1
    tree[a].append(b)
    tree[b].append(a)
for i in tree[0]:
    for j in tree[i]:
        if j == n - 1:
            print("POSSIBLE")
            exit()
print("IMPOSSIBLE")

-n, m = list(map(int, input().split())) +from sys import stdin + +nii = lambda: list(map(int, stdin.readline().split())) +n, m = nii() -    a, b = list(map(int, input().split())) +    a, b = nii()