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



transit = []

transit_ = []



for a,b in (list(map(int, input().split())) for _ in range(m)):

    if a == 1:

        transit.append(b)

    if b == n:

        transit_.append(a)



if set(transit)&set(transit_):

    print("POSSIBLE")

else:

    print("IMPOSSIBLE")
import sys

input = sys.stdin.readline



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



transit = []

transit_ = []



for a,b in (list(map(int, input().split())) for _ in range(m)):

    if a == 1:

        transit.append(b)

    if b == n:

        transit_.append(a)



if set(transit)&set(transit_):

    print("POSSIBLE")

else:

    print("IMPOSSIBLE")
n, m = list(map(int, input().split()))
transit = []
transit_ = []
for a, b in (list(map(int, input().split())) for _ in range(m)):
    if a == 1:
        transit.append(b)
    if b == n:
        transit_.append(a)
if set(transit) & set(transit_):
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

import sys

input = sys.stdin.readline
n, m = list(map(int, input().split()))
transit = []
transit_ = []
for a, b in (list(map(int, input().split())) for _ in range(m)):
    if a == 1:
        transit.append(b)
    if b == n:
        transit_.append(a)
if set(transit) & set(transit_):
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

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