#include<bits/stdc++.h>
using namespace std;
long long read()
{
	long long sum=0,fh=1;char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')fh=-1;ch=getchar();}
	while(ch>='0'&&ch<='9'){sum=(sum<<3)+(sum<<1)+(ch^48);ch=getchar();}
	return sum*fh;
}
#define Maxn 500010
#define Maxm 1000010
#define HgS 1000000007
struct EDGE{
	int to;
	int nxt;
}e[Maxn<<1];
int head[Maxn];
int u[Maxm];
int v[Maxm];
int cnt=0;
void build(int from,int to)
{
	e[++cnt].to=to;
	e[cnt].nxt=head[from];
	head[from]=cnt;
}
int n,m;
vector<int> g[Maxn];
int dfn[Maxn];
int low[Maxn];
bool vis[Maxn];
int pw[Maxn];
int DFN=0;
int top=0;
int stk[Maxn];
int siz[Maxn];
int tot=0;
void dfs(int p,int lst)
{
	stk[++top]=p;
	dfn[p]=low[p]=++DFN;
	for(auto k:g[p])
	{
		if(k==lst)continue;
		if(!dfn[k])
		{
			dfs(k,p);
			low[p]=min(low[p],low[k]);
			if(dfn[p]<low[k])
			{
				++tot;
				siz[tot]=0;
				while(stk[top]!=p)
				{
					siz[tot]++;
					top--;
				}
			}
		}
		else
		{
			low[p]=min(low[p],dfn[k]);
		}
	}
	/*if(!g[p].size())
	{
		++tot;
		siz[tot]=1;
//		top--;
	}*/
}
int modadd(int x,int y)
{
	x+=y;
	if(x>=HgS)x-=HgS;
	return x;
}
int fa[Maxn];
int G(int x)
{
	if(fa[x]==x)return x;
	return fa[x]=G(fa[x]);
}
void merge(int x,int y)
{
	x=G(x);
	y=G(y);
	if(x==y)return;
	fa[x]=y;
}
int main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	n=read();
	m=read();
	int ans=0;
	pw[0]=1;
	for(int i=1;i<=m;++i)
	{
		u[i]=read();
		v[i]=read();
	}
	int tot=0;
	for(int i=0;i<(1<<m);++i)
	{
		for(int j=1;j<(1<<n);++j)
		{
			bool F=1;
			for(int k=1;k<=m;++k)
			{
				if(!F)break;
				for(int l=1;l<=n;++l)
				{
					fa[l]=l;
				}
				for(int l=1;l<=m;++l)
				{
					if(!((1<<(l-1))&i))
					{
						if(l!=k)
						{
							merge(u[l],v[l]);
						}
					}
					else merge(u[l],v[l]);
				}
				int R=-1;
				for(int l=1;l<=n;++l)
				{
					if((1<<(l-1))&j)
					{
						int x=G(l);
						if(R==-1)R=x;
						else if(R!=x)
						{
							F=0;
							break;
						}
					}
//					cerr<<i<<' '<<k<<' '<<G(l)<<'\n';
				}
				if(!F)break;
			}
			if(F)tot++; 
		}
	}
	printf("%d\n",tot);
	/*for(int i=1;i<=n;++i)
	{
		pw[i]=1ll*pw[i-1]*2%HgS;
	}
	for(int i=1;i<=m;++i)
	{
		int x=read();
		int y=read();
		build(x,y);
		build(y,x);
		u[i]=x;
		v[i]=y;
	}
//	int ans=0;
	for(int i=0;i<(1<<m);++i)
	{
		tot=0;
		top=0;
		for(int j=1;j<=n;++j)
		{
			g[j].clear();
			dfn[j]=0;
		}
		DFN=0;
		for(int j=1;j<=m;++j)
		{
			if(!((1<<(j-1))&i))continue;
			g[u[j]].push_back(v[j]);
			g[v[j]].push_back(u[j]);
		}
		for(int j=1;j<=n;++j)
		{
			if(!dfn[j])
			{
				top=0;
				dfs(j,0);
				if(top)
				{
					siz[++tot]=top;
				}
			}
//			cerr<<j<<' '<<dfn[j]<<'\n';
		}
		if(top)
		{
			ans=modadd(ans,pw[top]-1);
		}
		for(int j=1;j<=tot;++j)
		{
			cerr<<j<<' '<<siz[j]<<'\n';
			ans=modadd(ans,pw[siz[j]]-1);
		}
		ans=modadd(ans,1);
	}
	printf("%d\n",ans);*/
	return 0;
}
