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

let () =
  let n, m = Scanf.scanf "%d %d\n" (fun n m -> n, m) in
  let abs = Array.init m (fun _ -> Scanf.scanf "%d %d\n" (fun a b -> a, b)) in
  let e = Array.make n IntSet.empty in
  Array.iter (fun (a, b) ->
    e.(a - 1) <- IntSet.add (b - 1) e.(a - 1);
    e.(b - 1) <- IntSet.add (a - 1) e.(b - 1)) abs;
  if IntSet.is_empty (IntSet.inter e.(0) e.(n - 1)) then
    print_endline "IMPOSSIBLE"
  else
    print_endline "POSSIBLE"