function Main(input) {
  var inputList = input.split("\n");
  var firstLine = inputList[0].split(" ");
  var N = Number(firstLine[0]);
  var M = Number(firstLine[1]);
  var checkedList = [];
  var neighbourVertices = [];
  var depth = 0;

  for (var i = 0; i < N; i++) {
    neighbourVertices[i] = [];
    checkedList[i] = false;
  }
  checkedList[0] = true;

  for (var i = 1; i < 1 + M; i++) {
    var line = inputList[i].split(" ");
    var a = Number(line[0]) - 1;
    var b = Number(line[1]) - 1;
    neighbourVertices[a].push(b);
    neighbourVertices[b].push(a);
  }

  function search(vertIndex, num, checkedList, depth) {
    var allTrue = true;

    for (var i = 0; i < checkedList.length; i++) {
      if (checkedList[i] == false) {
        allTrue = false;
        break;
      }
    }

    if (allTrue) {
      num++;
      return num;
    }

    var indexes = neighbourVertices[vertIndex];
    for (var i = 0; i < indexes.length; i++) {
      var n = indexes[i];
      if (checkedList[n]) {
        continue;
      }
      checkedList[n] = true;
      depth++;
      num = search(n, num, checkedList, depth);
      depth--;
      checkedList[n] = false;
    }
    return num;
  };

  console.log(search(0, 0, checkedList, depth))
}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'));