open Printf
open Scanf

module IntSet = Set.Make (struct
                           type t = int
                           let compare i j = i - j
                         end)

let tpl x y = (x, y)

let () =
  let n, m = scanf "%d %d " tpl in
  let al = Array.make n IntSet.empty in
  let rec iter x =
    if x = 0 then ()
    else let a, b = scanf "%d %d " (fun x y -> (x-1, y-1)) in
         al.(a) <- (IntSet.add b al.(a));
         al.(b) <- (IntSet.add a al.(b));
         iter (x-1)
  in
  iter m;
  (if IntSet.is_empty (IntSet.inter al.(0) al.(n-1)) then "IMPOSSIBLE" else "POSSIBLE") |> 
  printf "%s\n"
