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])

length = len(array[0])

array[0].update(array[1])

if len(array[0]) != len(array[1]) + length:
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')
