fun main(args: Array<String>) {
    abc054c()
}

fun abc054c() {
    val (n, m) = readLine()!!.split(' ').map { it.toInt() }
    val edges = (1..m).map { readLine()!!.split(' ').map { it.toInt() }.let { Edge(it[0] - 1, it[1] - 1) } }

    val graph = Array(n) { Vertex(it) }
    edges.forEach {
        val (from, to) = it
        graph[from].neighbor.add(to)
        graph[to].neighbor.add(from)
    }

    fun dfs(index: Int, visited: Set<Int>): Int {
        val to = graph[index].neighbor.filter { it !in visited }
        return if (to.isEmpty()) {
            if (visited.size + 1 == n) 1 else 0
        } else {
            to.map { dfs(it, visited + index) }.sum()
        }
    }

    val answer = dfs(0, setOf())

    println(answer)
}

private data class Edge(val from: Int, val to: Int)
private data class Vertex(val index: Int, val neighbor: MutableList<Int> = mutableListOf())
