import java.util.*
import java.math.*
import java.lang.Math.*


private val readString: ()->String = {readLine()!!}
private val readInt: ()->Int = { readLine()!!.toInt() }
private val readLong: ()->Long = { readLine()!!.toLong() }
private val readListInt: ()->List<Int> = { readLine()!!.split(' ').map(String::toInt) }
private val readListLong: ()->List<Long> = { readLine()!!.split(' ').map(String::toLong) }
private val errPrintln: (String)->Unit = { msg -> System.err.println(msg) }
private val MOD = 1e9.toLong()+7
private val INF = Int.MAX_VALUE/2
private val LINF = Long.MAX_VALUE/2


fun solveC(eg :Array<ArrayList<Int>>): Int {
    var res = 0
    val N = eg.size;
    val vis = BooleanArray(N){false}

    fun dfs(n: Int, x: Int): Unit {
        if (n>=N-1) {
            if (vis.count{it} == N) res++
            return
        }

        for (nx in eg[x]) {
            if (vis[nx]) continue
            vis[nx] = true
            dfs(n+1, nx)
            vis[nx] = false
        }
    }

    vis[0] = true
    dfs(0, 0)

    return res
}


fun main(args: Array<String>) {
    val (N,M) = readListInt()
    val eg = Array(N){ArrayList<Int>()}
    for(i in 0 until M) {
        val (a, b) = readListInt().map{it -1}
        eg[a].add(b)
        eg[b].add(a)
    }

    val ans = solveC(eg)

    println(ans)
}
