#include <bits/stdc++.h>
using namespace std;
int a[100010],b[100010],pd[20],pd2[20];
int aa[1010],bb[1010],cc[1010],vis[1010];
int n,m,tt,it,ans=0;
void dfs(int now)
{
	vis[now]=0;
	int t=cc[now];
	while (t)
	{
		if (vis[aa[t]]==1) dfs(aa[t]);
		t=bb[t];
	}
}
void check()
{
	tt=0;
	for (int i=1;i<=n;i++) cc[i]=0;
	for (int i=1;i<=m;i++) if (pd2[i]==1)
	{
		aa[++tt]=a[i];bb[tt]=cc[b[i]];cc[b[i]]=tt;
		aa[++tt]=b[i];bb[tt]=cc[a[i]];cc[a[i]]=tt;
	}
	it=-1;
	for (int i=1;i<=n;i++)
	{
		vis[i]=pd[i];
		if (pd[i]==1) it=i;
	}
	if (it==-1) return;
	dfs(it);
	for (int i=1;i<=n;i++) if (vis[i]==1) return;
	ans++;
}
void qpl2(int now,int t)
{
	if (now==t+1)
	{
		check();
		return;
	}
	pd2[now]=0;qpl2(now+1,t);
	pd2[now]=1;qpl2(now+1,t);
}
void qpl(int now,int t)
{
	if (now==t+1)
	{
		qpl2(1,m);
		return;
	}
	pd[now]=0;qpl(now+1,t);
	pd[now]=1;qpl(now+1,t);
}
int main()
{
	freopen("barrack.in","r",stdin);freopen("barrack.out","w",stdout);
	scanf("%d%d",&n,&m);
	if (n<=8)
	{
		for (int i=1;i<=m;i++) scanf("%d%d",&a[i],&b[i]);
		ans=0;
		qpl(1,n);
		cout<<ans<<endl;
		return 0;
	}
	return 0;
}