function Main(s) {

  var s = s.split("\n").map(e => e.split(" ").map(e => e*1));
  n = s[0][0], m = s[0][1];
  var e = s.slice(1, m+1);
  var g = new Array(n+1);
  for (var i = 0; i < n+1; i++) g[i] = new Array();
  for (var i = 0; i < m; i++) {
      g[e[i][0]].push(e[i][1]);
      g[e[i][1]].push(e[i][0]);
  }
  ans = 0;
  traverse = (n * (n+1))/2;
  check = new Set([1]);
  function mapForSet(set) {
    var n = [];
    for (var i of set) {
      n.push(i);
    }
    return new Set(n);
  }
  stack = [[1, -1, 0, check]];
  while (stack.length > 0) {
    vc = stack[0][0], pc = stack[0][1];
    cntc = stack[0][2], checkc = stack[0][3];
    stack.shift();
    if (cntc >= n - 1) {
      if (checkc.size == n) {
        ans++;
      }
      continue;
    }
    for (var nv of g[vc]) {
      if (nv == pc) continue;
      stack.push([nv, vc, cntc + 1, mapForSet(checkc).add(nv)]);
    }
  }

  console.log(ans);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));