import java.util.Scanner

import scala.collection.mutable

object Main extends App {
  val sc = new Scanner(System.in)
  val Vector(n, m) = Vector.fill(2)(sc.nextInt)
  val map: mutable.Map[Int, Set[Int]] = mutable.Map.empty
  (1 to n).foreach { i => map.update(i, Set.empty) }

  val es = Vector.fill(m)(Edge(sc.nextInt, sc.nextInt))
  es.foreach { e =>
    map.update(e.v1, map(e.v1) + e.v2)
    map.update(e.v2, map(e.v2) + e.v1)
  }

  println(solve(1, Set(1), "1"))

  def solve(current: Int, already: Set[Int], route: String): Int = {
    val ints: Set[Int] = map(current) -- already
    if (already.size == n) 1 else {
      if (ints.isEmpty) 0
      else ints.toStream.map(n => solve(n, already + n, route + s"->$n")).sum
    }
  }
}

case class Edge(v1: Int, v2: Int)

case class Vertex(index: Int, nexts: Set[Int])
