#include<bits/stdc++.h>
using namespace std;
int i,j,n,m,k,l,answer,num,p,a[100][100],b[100][100];
int s1[100],s2[100],ans[100],fl[100];
inline int read()
{
	bool f=0;int x=0;char c=getchar();
	while(!isdigit(c)) f|=c=='-',c=getchar();
	while(isdigit(c)) x=(x<<1)+(x<<3)+(c^48),c=getchar();
	if (f) x=-x;return x;
}
inline int find(int x,int y)
{
	if (x==0)
	{
		int q=0;
		for (int i=1;i<y;i++)
		  q=q+b[ans[i]][ans[i+1]];
		p=min(p,q);
		return p;
	}
	int v=0x3f3f3f3f;
	for (int i=1;i<=y;i++)
	  if (fl[s2[i]]==0)
	  {
	  	fl[s2[i]]=1;ans[x]=s2[i];
	  	v=min(v,find(x-1,y));
	  	fl[s2[i]]=0;ans[x]=0;
	  }
	return v;
}
inline void dfs(int z,int x,int y)
{
	if (x==0)
	{
		p=0x3f3f3f3f;find(y,y);
		for (int j=1;j<=m-p+1;j++) answer+=a[m-p+1][j];
		cout<<m-p<<' '<<answer<<endl;
	}
	int v=0x3f3f3f3f;
	for (int i=z+1;i<=n;i++)
	  if (s1[i]==0)
	  {
	  	s1[i]=1;s2[x]=i;
	    dfs(i,x-1,y);
	  	s1[i]=0;s2[x]=0;
	  }
}
int main()
{
//	freopen("barrack.in","r",stdin);
//	freopen("barrack.out","w",stdout);
	n=read();m=read();memset(b,0x3f3f3f3f,sizeof(a));
	for (int i=1;i<=30;i++) a[i][1]=1,a[i][i]=1;
	for (int i=3;i<=30;i++)
	  for (int j=2;j<=i;j++) a[i][j]=a[i-1][j]+a[i-1][j-1];
	for (int i=1;i<=m;i++)
	{
		int x=read(),y=read();
		b[x][y]=1;b[y][x]=1;
	}
	for (int i=1;i<=n;i++)
	  for (int k=1;k<=n;k++)	
	    for (int j=1;j<=n;j++)
	      b[i][j]=min(b[i][j],b[i][k]+b[k][j]);
	for (int i=1;i<=n;i++)
	{
		dfs(0,i,i);
//		for (int j=1;j<=m-k;j++) answer+=a[m-k][j];
//		answer+=1;
	}
	cout<<answer<<endl;
	return 0;
}/*
4 4
1 2
2 3
3 1
1 4
*/