#include<bits/stdc++.h>
using namespace std;
int n,m,cnt,u[55],v[55],f[55][55];
void solve1()
{
	for (int i=1;i<=m;i++)
	{
		scanf("%d%d",&u[i],&v[i]);
	}
	int nn=(1<<n),mm=(1<<m);cnt=0;
	for (int i=1;i<=nn-1;i++)
	    for (int j=0;j<=mm-1;j++)
	    {
	    	for (int ii=1;ii<=n;ii++)
	    	{
	    	    for (int jj=1;jj<=n;jj++)
	    	        f[ii][jj]=0;
	    	    f[ii][ii]=1;
	    	}
	    	for (int k=1;k<=m;k++)
	    	{
	    		int aa=(j>>(k-1))&1;
	    		if (aa) f[u[k]][v[k]]=f[v[k]][u[k]]=1;
	    		else f[u[k]][v[k]]=f[v[k]][u[k]]=0;
			}
	    	for (int k=1;k<=n;k++)
	    	    for (int ii=1;ii<=n;ii++)
	    	        for (int jj=1;jj<=n;jj++)
	    	            if ((f[ii][k]||f[k][ii])&&(f[k][jj]||f[jj][k])) f[ii][jj]=f[jj][ii]=1;
			bool o=true;
	    	for (int k=1;k<=n;k++)
	    	{
	    		int bb=(i>>(k-1))&1;
	    		for (int l=1;l<=n;l++)
	    		{
	    			int aa=(i>>(l-1))&1;
	    			if (k!=l&&aa&&bb&&(f[k][l]==0))
	    			{
	    				o=false;
	    				break;
					}
				}
				if (!o) break;
			}
			if (o) cnt++;
		}
	printf("%d\n",cnt);
	return ;
}
int main ()
{
    freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	scanf("%d%d",&n,&m);
	if (n<=8&&m<=10) solve1();
	return 0;
}
