n, m = map(int, input().split())
list_AB = [ list(map(int,input().split(" "))) for i in range(m)]
list_MAP = [0]*(n+1)

for l in list_AB:
    l.sort()
    if l[0] == 1:
        list_MAP[l[1]] += 1
    if l[1] == n:
        list_MAP[l[0]] += 1

ans = "IMPOSSIBLE"

for num in list_MAP:
    if num > 1:
        ans = "POSSIBLE"

print(ans)