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

let read_ns () = Scanf.scanf "%d %d " (fun x y -> (x, y))

let () =
  let (n, m) = read_ns () in
  let g = Array.make n IntSet.empty in
  for _ = 1 to m do
    let (a, b) = read_ns () in
    let (a, b) = (a - 1, b - 1) in
    g.(a) <- IntSet.add b g.(a);
    g.(b) <- IntSet.add a g.(b);
  done;
  print_endline
    (if IntSet.is_empty (IntSet.inter g.(0) g.(n - 1)) then "IMPOSSIBLE"
     else "POSSIBLE")