import std.stdio, std.string, std.conv, std.algorithm, std.range;

void main() {
    auto S = readln.split.to!(int[]);
    auto N = S[0], M = S[1];
    auto table = new int[][N];
    foreach (i; 0..M) {
        auto edge = readln.split.map!(a => to!int(a)-1).array;
        table[edge[0]] ~= edge[1];
        table[edge[1]] ~= edge[0];
    }

    alias getSelection = (c, memo) => table[c].filter!(a => !memo.canFind(a)).array;
    int go(int c, int[] memo) {
        auto selection = getSelection(c, memo);
        if (memo.length == N-1) return 1;
        if (selection.length == 0) return 0;
        return selection.map!(a => go(a, memo ~ c)).sum;
    }
    writeln(go(0, new int[0]));
}