import java.util.*

val readInts: ()->List<Int> = { readLine()!!.split(' ').map(String::toInt) }

fun main(args: Array<String>) {
    val (N, M) = readInts()
    val egs = Array(N){
        ArrayList<Int>(0)
    }
    repeat(M) {
        var (a, b) = readInts()
        a--; b--
        egs[a].add(b)
        egs[b].add(a)
    }

    var ans = 0
    var vis = BooleanArray(N){false}

    fun dfs(x:Int, px:Int=-1) {
        if (vis[x]) return
        vis[x] = true

        if (vis.filter{it}.size == N) ans++

        for(nx in egs[x]) {
            if (nx == px) continue
            dfs(nx, x)
        }

        vis[x] = false
    }

    dfs(0)

    println(ans)
}
