n = input().split(' ')

array = [set(), set()]

for i in range(int(n[1])):
    a = input().split(' ')
    if a[0] == '1':
        array[0].add(a[1])
    elif a[1] == n[0]:
        array[1].add(a[0])

if n[0] in array[0] == True:
    print('POSSIBLE')
elif n[0] in array[1] == False:
    print('IMPOSSIBLE')
else:
    printed = False
    for i in array[0]:
        if i in array[1] == True:
            printed = True
            print('POSSIBLE')
            break
    if(printed == False):
        print('IMPOSSIBLE')
