object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n, m = sc.nextInt()
  val e = List.fill(m)((sc.nextInt()-1, sc.nextInt()-1))
  val adj = Array.fill(n)(List[Int]())
  for ((a, b) <- e) {
    adj(a) ::= b
    adj(b) ::= a
  }

  println(if (adj(0).flatMap(adj).contains(n-1)) "POSSIBLE" else "IMPOSSIBLE")
}
