#include<bits/stdc++.h>
#define int int
#define For(i,a,b) for ( register int i=(a);i<=(b);i++ )
#define Dow(i,a,b) for ( int i=(a);i>=(b);i-- )
using namespace std;
const int Mo=1e9+7;
const int N=5e5+5;
vector<int> G[N];
int n,m,ans,a[25],b[25],s[N],t[N],d[25][25],H[10][10],need[25];
inline void doit()
{
	memset(H,0,sizeof(H));
	int cnta=0;
	For(i,1,n) 
	{
		cnta+=(a[i]),d[i][i]=0;
		if(a[i]) need[cnta]=i;
	}
	For(i,1,m) if(b[i]) H[s[i]][t[i]]=H[t[i]][s[i]]=1;
	if(cnta==0) return;
	int flg=0;
	For(i,1,m) if(!b[i])
	{
		For(x,1,n) For(y,1,n) d[x][y]=1e9;
		For(i,1,n) d[i][i]=1;
		For(k,1,m) d[s[k]][t[k]]=d[t[k]][s[k]]=1;
		d[s[i]][t[i]]=d[t[i]][s[i]]=1e9;
		For(k,1,m) if(b[k]) d[s[k]][t[k]]=d[t[k]][s[k]]=1;
		For(x,1,n) For(y,1,n) if(x!=y) For(z,y+1,n) if(x!=z)
		d[y][z]=min(d[y][z],d[y][x]+d[x][z]);
		For(k,1,cnta) 
		For(l,k+1,cnta) if(d[need[k]][need[l]]>=1e9) 
		{
			flg=1;
			break;
		}
		if(flg) break;
	}	
	if(!flg) ans++;
}
inline void dfs2(int x)
{
	if(x==m+1) { doit(); return; }
	For(i,0,1) b[x]=i,dfs2(x+1),b[x]=0;
}
inline void dfs(int x)
{
	if(x==n+1) { dfs2(1); return; }
	For(i,0,1) a[x]=i,dfs(x+1),a[x]=0;
}
signed main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	scanf("%d%d",&n,&m);
	For(i,1,m) 
	{
		int x,y;
		scanf("%d%d",&x,&y);
		G[x].push_back(y);
		G[y].push_back(x);
		s[i]=x,t[i]=y;
	}
	if(n+m<=20) 
	{
		dfs(1);
		printf("%d\n",ans);
		ans=0;
	}
}
