from collections import deque

#グラフの連結成分を調べる

def Graph(ab):

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

    for a,b in ab:

        G[a-1].append(b)

        G[b-1].append(a)

    return G



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

ab = [list(map(int,input().split())) for i in range(m)]

G = Graph(ab)



for v in G[0]:

    if n in G[v - 1]:

        print('POSSIBLE')

        exit()

print('IMPOSSIBLE')
#グラフの連結成分を調べる

def Graph(ab):

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

    for a,b in ab:

        G[a-1].append(b)

        G[b-1].append(a)

    return G

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

ab = [list(map(int,input().split())) for i in range(m)]

G = Graph(ab)



for new_v in G[0]:

    if n in G[new_v - 1]:

        print('POSSIBLE')

        exit()

print('IMPOSSIBLE')
from collections import deque

# グラフの連結成分を調べる
def Graph(ab):
    G = [[] for i in range(n)]
    for a, b in ab:
        G[a - 1].append(b)
        G[b - 1].append(a)
    return G


n, m = list(map(int, input().split()))
ab = [list(map(int, input().split())) for i in range(m)]
G = Graph(ab)
for v in G[0]:
    if n in G[v - 1]:
        print("POSSIBLE")
        exit()
print("IMPOSSIBLE")

# グラフの連結成分を調べる
def Graph(ab):
    G = [[] for i in range(n)]
    for a, b in ab:
        G[a - 1].append(b)
        G[b - 1].append(a)
    return G


n, m = list(map(int, input().split()))
ab = [list(map(int, input().split())) for i in range(m)]
G = Graph(ab)
for new_v in G[0]:
    if n in G[new_v - 1]:
        print("POSSIBLE")
        exit()
print("IMPOSSIBLE")

-from collections import deque - -for v in G[0]: -    if n in G[v - 1]: +for new_v in G[0]: +    if n in G[new_v - 1]: