#include <bits/stdc++.h>
using namespace std;
const int N = 5e1 + 10;
const int M = 5e1 + 10;
const long long MOD = 1e9 + 7;
struct bian{int from, to, flag;}eg[M << 1], eg1[M << 1];
int front[N], num;
void add(int x, int y)
{
	eg[++ num] = (bian){front[x], y};
	front[x] = num;
}
int vis[N];
int n, m;
int dfs(int S1, int S2, int o, int from)
{
	int re = (S1 >> (o - 1)) & 1;
	vis[o] = 1; 
	for (int i = front[o]; i; i = eg[i].from)
	{
		int to = eg[i].to;
		if(from == to || vis[to]) continue;
		re += dfs(S1, S2, to, o);
	}
	return re;
}
int check(int S1, int S2)
{
	int tot = 0;
	for (int i = 0; i < n; ++ i) tot += (S1 >> i) & 1;
	for (int o = 1; o <= n; ++ o)
	{
		for (int i = front[o]; i; i = eg[i].from)
		{
			if((S2 >> ((i - 1) >> 1)) & 1)continue;
			int to = eg[i].to;
			memset(vis, 0, sizeof(vis));
			if(dfs(S1, S2, o, to) % tot != 0) return 0;
		}
	}
	return 1;
}
int main()
{
	freopen("barrack.in", "r", stdin);
	freopen("barrack.ans", "w", stdout);
	ios::sync_with_stdio(0);
	cin.tie(0), cout.tie(0);
	cin >> n >> m;
	for (int i = 1; i <= m; ++ i)
	{
		int x, y;
		cin >> x >> y;
		add(x, y); add(y, x);
	}
	int ans = 0;
	for (int S1 = 1; S1 < (1 << n); ++ S1)
	for (int S2 = 0; S2 < (1 << m); ++ S2)
	ans += check(S1, S2);
	cout << ans;
}