import std.algorithm;
import std.array;
import std.ascii;
import std.container;
import std.conv;
import std.math;
import std.numeric;
import std.range;
import std.stdio;
import std.string;
import std.typecons;
void log(A...)(A arg) { stderr.writeln(arg); }
int size(T)(in T s) { return cast(int)s.length; }

void main() {
    int N, M; readf("%d %d\n", &N, &M);
    auto G = new bool[][](N, N);
    foreach (i; 0 .. M) {
        int a, b; readf("%d %d\n", &a, &b); a--; b--;
        G[a][b] = G[b][a] = true;
    }

    int ans = 0;
    void dfs(int v, int used) {
        used |= 1 << v;
        if (used == (1 << N) - 1) {
            ans++;
            return;
        }
        foreach (u; 0 .. N) {
            if (v == u) continue;
            if (! G[v][u]) continue;
            if (used & (1 << u)) continue;
            dfs(u, used);
        }
    }
    dfs(0, 0);
    writeln(ans);
}
