#include<bits/stdc++.h>
using namespace std;
struct cao
{
	int u,v;
}e[20];
int n,m,fa[10],tng[10][10];
int tong[10];
int finds(int x)
{
	if(fa[x]==x) return x;
	return fa[x]=finds(fa[x]);
}
bool solve(int x,int y)
{
	for(int i=1;i<=n;i++) fa[i]=i;
	for(int i=1;i<=m;i++)
	{
		if(y&(1<<(i-1)))
		{
			int u=finds(e[i].u),v=finds(e[i].v);
			if(u!=v)
			{
				fa[u]=v;
			}
		}
	}
	memset(tong,0,sizeof(tong));
	memset(tng,0,sizeof(tng));
	for(int i=1;i<=n;i++)
	{
		if(x&(1<<(i-1)))
		{
			tong[i]=finds(i);
		}
	}
	for(int i=1;i<=m;i++)
	{
		if(tong[e[i].u]==tong[e[i].v]||!(x&(1<<(e[i].u-1)))||!(x&(1<<(e[i].v-1)))) continue;
		else 
		{
			tng[tong[e[i].u]][tong[e[i].v]]++;
			tng[tong[e[i].v]][tong[e[i].u]]++;
		}
	}
	for(int i=1;i<=n;i++)
	{
		for(int j=i+1;j<=n;j++)
		{
			if(tong[i]!=tong[j]&&(x&(1<<(i-1))&&(x&(1<<(j-1)))))
			{
				if(tng[tong[i]][tong[j]]<=1) return false;
			}
		}
	}
	return true;
}
int main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	scanf("%d%d",&n,&m);
	for(int i=1;i<=m;i++)
		scanf("%d%d",&e[i].u,&e[i].v);
	int ans=0;
	for(int i=1;i<(1<<n);i++)
	{
		for(int j=0;j<(1<<m);j++)
		{
			if(solve(i,j)) ans++;
		}
	}
	cout<<ans;
	return 0;
}
