

fun main(arr:Array<String>) {
    val(n, m) = readLine()!!.split(" ").map { it.toInt() }
    pointCount = n
    (1..m).forEach {
        val (p1,p2) = readLine()!!.split(" ").map { it.toInt() }
        if(!path.containsKey(p1)) {
            path[p1] = mutableMapOf()
        }
        if(!path.containsKey(p2)) {
            path[p2] = mutableMapOf()
        }
        path[p1]!![p2] = true
        path[p2]!![p1] = true
    }

    val ans = getAns(1, 0)
    println(ans)

}

var pointCount = 0
val path = mutableMapOf<Int, MutableMap<Int, Boolean>>()

fun getAns(pos:Int, key:Int):Long {
    val newKey = key + (1 shl (pos - 1))
    if(newKey >= (1 shl pointCount) - 1) {
        return 1
    }
    var ans = 0L
    for(next in path[pos]!!.keys) {
        val nextKey = 1 shl (next - 1)
        if((key and nextKey) != 0) {
            continue
        }
        ans += getAns(next, newKey)
    }
    return ans
}

