import std.stdio;
import std.algorithm;
import std.conv;
import std.numeric;
import std.math;
import std.string;

void main()
{
	auto tokens = split(chomp(readln()));
	auto n = to!int(tokens[0]);
	auto m = to!int(tokens[1]);
	int[][] nodes;
	nodes.length = n;
	foreach (i; 0..m)
	{
		auto tokens2 = split(chomp(readln()));
		auto a = to!int(tokens2[0]) - 1;
		auto b = to!int(tokens2[1]) - 1;
		nodes[a] ~= b;
		nodes[b] ~= a;
	}
	
	int search(int pos, int[] open)
	{
		if (open.length == 0) return 1;
		int cnt;
		foreach (next; nodes[pos])
		{
			auto oi = countUntil(open, next);
			if (oi == -1) continue;
			cnt += search(next, remove(open.dup, oi));
		}
		return cnt;
	}

	int[] open_start;
	foreach (i; 1..n) open_start ~= i;
	auto result = search(0, open_start);
	
	writeln(result);
	stdout.flush();
}