n,m = input().split()
n = int(n)
m = int(m)
l = [[] for i in range(n)]
for i in range(m):
    a,b = input().split()
    a = int(a)
    b = int(b)
    l[a-1].append(b-1)
    l[b-1].append(a-1)

f = False
for i in l[0]:
    for j in l[i]:
        if j == n-1:
            f = True
            break
if f:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")