Scanf.scanf "%d %d" (fun n m ->
    let nei = Array.make n [] in
    for i = 1 to m do
        Scanf.scanf " %d %d" (fun a b ->
            let a = a - 1 in
            let b = b - 1 in
            nei.(a) <- b :: nei.(a);
            nei.(b) <- a :: nei.(b)
        )
    done;

    let full = 1 lsl n - 1 in
    let rec loop cur set =
        if set = full then 1 else
            List.fold_left (fun acc v ->
                if (1 lsl v) land set = 0 then acc + loop v ((1 lsl v) lor set) else acc) 0 nei.(cur)
    in
    loop 0 1 |> Printf.printf "%d\n"
)