import scala.io.{ StdIn => in}
import scala.annotation.tailrec

object Main extends App {
  val Array(n, m) = in.readLine.split(" ").map(_.toInt)
  val graph = Array.ofDim[Boolean](n, n)

  Iterator.continually(in.readLine)
    .take(m)
    .map(_.split(" ").map(_.toInt - 1))
    .foreach(e => {
      graph(e(0))(e(1)) = true
      graph(e(1))(e(0)) = true
    })

  def solve():Int = {
    var cnt = 0
    val p = Array.ofDim[Int](n)

    def evalute():Unit = {
      // println(p.mkString(" "))
      @tailrec
      def rec(idx:Int):Boolean = {
        val next = idx+1
        if(next == n) true
        else if(graph(p(idx))(p(next))) rec(next)
        else false
      }

      if(rec(0)) cnt += 1
    }

    def dfs(pos:Int, mask:Int):Unit = {
      if(pos == n) evalute
      else {
        for(i <- 0 until n if (mask & (1<<i)) > 0) {
          p(pos) = i
          dfs(pos+1, mask ^ (1<<i))
        }
      }
    }

    dfs(1, ((1<<n)-1) ^ 1<<0)
    cnt
  }

  println(solve)
}