program abc068c
  implicit none
  integer n, m, a, b, i
  integer,allocatable :: x(:), y(:)

  read *, n,m
  allocate(x(m),y(m))

  x = 0
  y = 0

  do i = 1,m
     read *, a,b
     if (a == 1) then
        x(b) = 1
     else if (a == n) then
        y(b) = 1
     else if (b == n) then
        y(a) = 1
     end if
  end do

  if (dot_product(x,y) > 0) then
     print *, 'POSSIBLE'
  else
     print *, 'IMPOSSIBLE'
  end if
end program abc068c
