function Main(input) {
    input = input.trim().split("\n").map(function(x) { return x.split(" ")});
    var N = input[0].map(e => parseInt(e, 10))[0];
    var M = input[0].map(e => parseInt(e, 10))[1];
    var ans = 0;
    var ary_ab, vec_pi, ab, ary_p, tmp;
    ary_ab = Array.from({ length: N }, () => []);
    vec_pi = [];
    ary_p = [];
    	
    for (var i = 1; i <= M; i++){
		ab = input[i].map(e => parseInt(e, 10));
		ary_ab[ab[0] - 1].push(ab[1]);
	      ary_ab[ab[1] - 1].push(ab[0]);
    }
    for (var i = 0; i < N; i++){
    	vec_pi.push(i + 1);
    }
	ary_p.push(vec_pi.slice());    
    for (var i = 1; i < kaijo(N - 1); i++) {
    	switch_loop:
    	for (var j = 2; j < N; j++){
			for (var k = 1; k < j; k++){
				if (vec_pi[N - j] < vec_pi[N - k]){
					tmp = vec_pi[N - j];
					vec_pi[N - j] = vec_pi[N-k];
					vec_pi[N - k] = tmp;
					vec_pi = vec_pi.slice(0, (N - j + 1)).concat(vec_pi.slice(N - j + 1).sort(compareFunc));
					ary_p.push(vec_pi.slice());
					break switch_loop; 
				}
			}
		}
	}
	for (var i = 0; i < ary_p.length; i++){
		vec_pi = ary_p[i];
		var j = 0
		pOrder_loop:
		for (j = 0; j < (N - 1); j++){
			if (ary_ab[vec_pi[j]- 1].indexOf(vec_pi[j + 1]) == -1) break pOrder_loop;
		}
		if (j == (N - 1)) ans++;
	}
  console.log(ans);
}
function kaijo(num){
    var ans = 1;
    for (var i = 2; i <= num; i++){
        ans *= i;
    } 
    return ans;    
}
function compareFunc(a, b) {
  return a - b;
}

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