process.stdin.resume();
process.stdin.setEncoding('ascii');

var input_stdin = "";
var input_stdin_array = "";
var input_currentline = 0;

process.stdin.on('data', function (data) {
    input_stdin += data;
});
/*
process.on('SIGINT', function(){
    input_stdin_array = input_stdin.split("\n");
    main();
    process.exit();
});
*/
process.stdin.on('end', function () {
    input_stdin_array = input_stdin.split("\n");
    main();    
});

function readLine() {
    return input_stdin_array[input_currentline++];
}

/////////////// ignore above this line ////////////////////


function main() {
	var s = readLine();	
    s = s.split(" ");
	var N = parseInt(s[0]);
	var M = parseInt(s[1]);
	/*adjacency matrix*/
	var ADJ = []; 
    var vis = [];
	
	/*initalizing ADJ and vis array*/
	for (var i=0; i < N; i++){
		ADJ.push([]);
		vis.push(0);
	}
	
	/*reading the graph*/
	for (var i=0; i < M; i++){
		s = readLine().split(" ");
		var a = parseInt(s[0]); 
		var b = parseInt(s[1]); 
		a--; b--; /* now indexing from 0 to n-1 */
		ADJ[a].push(b);
		ADJ[b].push(a);
	}
	
	function dfs(nod, cant){
		if (cant == N) return 1;
		var ret=0;
		vis[nod] = 1;
		for (var i=0; i < ADJ[nod].length; i++){
			if (vis[ADJ[nod][i]] == 0){
				ret += dfs(ADJ[nod][i], cant+1);
			}
		}
		vis[nod] = 0;
		return ret;
	}
	
	console.log(dfs(0,1));
}