import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)

  val N, M = sc.nextInt()
  val graph = Array.fill[List[Int]](N+1)(Nil)
  for (_ <- 1 to M) {
    val a, b = sc.nextInt()
    graph(a) = b :: graph(a)
    graph(b) = a :: graph(b)
  }

  if(dfs(1, 0))
    println("POSSIBLE")
  else
    println("IMPOSSIBLE")

  def dfs(node: Int, cnt: Int): Boolean = {
    if (node == N)
      true
    else {
      if(cnt == 2)
        false
      else
        for(e <- graph(node))
          dfs(e, cnt+1)
    }
  }
}
