fun main(args: Array<String>) {
    val (N, M) = readInputLine().split(" ").map { it.toInt() }
    val edges = mutableMapOf<Int, MutableList<Int>>()
    
    for (i in 1..M) {
        val (a, b) = readInputLine().split(" ").map { it.toInt() }
        val aEdges = edges.get(a) ?: mutableListOf<Int>()
        aEdges.add(b)
        edges.put(a, aEdges)
        
        val bEdges = edges.get(b) ?: mutableListOf<Int>()
        bEdges.add(a)
        edges.put(b, bEdges)
    }
    
    println(dfs(edges, 1, (2..N).toSet()))
}

fun readInputLine(): String {
    return readLine()!!
}

fun dfs(edges: Map<Int, List<Int>>, now: Int, rest: Set<Int>): Int {
    if (rest.isEmpty()) {
        return 1
    }
    
    var ans = 0
    
    for (e in edges.get(now)!!) {
        if (rest.contains(e)) {
            ans += dfs(edges, e, rest.minusElement(e))
        }
    }
    
    return ans
}
