import core.bitop, std.algorithm, std.ascii, std.bigint, std.conv,
    std.functional, std.math, std.numeric, std.range, std.stdio, std.string,
    std.random, std.typecons, std.container;

ulong MAX = 1_000_100, MOD = 1_000_000_007, INF = 1_000_000_000_000;
alias sread = () => readln.chomp();
alias lread(T = long) = () => readln.chomp.to!(T);
alias aryread(T = long) = () => readln.split.to!(T[]);
alias Clue = Tuple!(long, "x", long, "y", long, "h");
alias PQueue(T, alias less = "a<b") = BinaryHeap!(Array!T, less);

long cnt;

void main()
{
    long n, m;
    scan(n, m);
    auto graph = new long[][](n, 0);
    foreach (_; iota(m))
    {
        long a, b;
        scan(a, b);
        a--, b--;
        graph[a] ~= b;
        graph[b] ~= a;
    }
    auto visit = new bool[](n);
    visit[0] = true;
    dfs(graph, 0, visit);
    cnt.writeln();
}

void dfs(T)(T g, long current, bool[] visit)
{
    // current.writeln();
    foreach (e; g[current])
    {
        if (!visit[e])
        {
            visit[e] = true;
            dfs(g, e, visit);
            visit[e] = false;
        }
    }
    if (visit.all_true())
        cnt++;
}

bool all_true(bool[] a)
{
    bool ret = true;
    foreach (e; a)
        ret &= e;
    return ret;
}

void scan(TList...)(ref TList Args)
{
    auto line = readln.split();
    foreach (i, T; TList)
    {
        T val = line[i].to!(T);
        Args[i] = val;
    }
}
