var N,M,nodes;
function main(input) {
    N = input[0].split(" ")[0]-0;
    M = input[0].split(" ")[1]-0;
    nodes = {};
    for(var i=1;i<=M;i++){
        var a = input[i].split(" ")[0]-0;
        var b = input[i].split(" ")[1]-0;
        nodes[a] = nodes[a]||[];
        nodes[b] = nodes[b]||[];
        nodes[a].push(b);
        nodes[b].push(a);
    }
    console.log(calc(nodes,1,[1]));
    
}

function calc(nodes,now,route){
    if(route.length == N){
        return 1;
    }
    var ans = 0;
    var next = nodes[now];
    for(var i=0;i<next.length;i++){
        if(route.indexOf(next[i]) == -1){
            ans += calc(nodes, next[i], route.concat(next[i]))
        }
    }
    return ans;
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"))
