let n, m = Scanf.scanf "%d %d\n" (fun n m -> n, m)
let edge = Array.make (n + 1) []

let rec load_graph i =
  if i < m then
    Scanf.scanf "%d %d\n" (fun a b ->
      edge.(a) <- b :: edge.(a);
      edge.(b) <- a :: edge.(b);
      load_graph (i + 1)
    )

let rec ans v exists rest =
  if rest = 0 then 1
  else
    let rec f ret = function
        [] -> ret
      | u :: l ->
        if exists.(u) then (
          let copy = Array.init (n + 1) (fun i -> exists.(i)) in
          copy.(u) <- false;
          f (ret + ans u copy (rest - 1)) l
        ) else f ret l
    in f 0 edge.(v)

let () =
  load_graph 0;
  let exists = Array.make (n + 1) true in
  exists.(1) <- false;
  print_int (ans 1 exists (n - 1))
