
var visited = mutableListOf<Boolean>()
var pathList = Array(100) {arrayOfNulls<Boolean>(100)}
var n = 0
var m = 0

fun main(args: Array<String>) {

    val total = readLine()?.split(" ").orEmpty()
    n = total[0].toInt()
    m = total[1].toInt()

   var k = 0
   while(k < 100){
       var l = 0
       while(l < 100){
            pathList[k][l] = false
            l++
        }
       k++
    }

    var i = 0
    while(i < m){
        var path = readLine()?.split(" ").orEmpty()
            pathList[path[0].toInt() - 1][path[1].toInt() - 1] = true
            pathList[path[1].toInt() - 1][path[0].toInt() - 1] = true
        i++
    }


    for(j in 1 .. n){
        visited.add(false)
    }
    //----------------------------------------------------------

    println(dfs(0,0))

    //----------------------------------------------------------


}

fun dfs( now: Int, depth: Int): Int {
    if (visited[now]) {
        return 0
    }
    if (depth == n - 1) {
        return 1
    }
    visited[now] = true
    var totalPaths = 0

    for (h in 0 until n) {
        if (pathList[now][h]!!) {
            totalPaths += dfs(h, depth + 1)
        }
    }
    visited[now] = false
    return totalPaths
}


