import java.util.*

fun main(args: Array<String>) {
    val (N, M) = readLine()!!.split(" ").map{it.toInt()}
    val g = Graph(N, 0L, 0L) { x, y -> x + y }

    for (i in 1..M) {
        val (a, b) = readLine()!!.split(" ").map{it.toInt()}
        g.edges[a - 1].add(Edge(a - 1, b - 1, 0L))
        g.edges[b - 1].add(Edge(b - 1, a - 1, 0L))
    }

    val dp = Array(1 shl N) { Array(N) { 0 } }

    dp[1][0] = 1
    for (s in 1 until (1 shl N) - 1) {
        for (u in 0 until N) {
            if (s and (1 shl u) == 0) {
                continue
            }

            for (e in g.edges[u]) {
                if (s and (1 shl e.to) != 0) {
                    continue
                }

                val t = s or (1 shl e.to)
                dp[t][e.to] += dp[s][u]
            }
        }
    }

    println(dp[(1 shl N) - 1].sum())
}

data class Edge<T: Comparable<T>>(val from: Int, val to: Int, val weight: T): Comparable<Edge<T>> {
    constructor(from: Long, to: Long, weight: T) : this(from.toInt(), to.toInt(), weight)

    override fun compareTo(other: Edge<T>) = weight.compareTo(other.weight)
}

class Graph<T: Comparable<T>>(val n: Int, val zero: T, val inf: T, val plus: (T, T) -> T) {
    val edges = Array(n) { ArrayList<Edge<T>>() }
}

