#include<bits/stdc++.h>
#define ll long long
#define wo 1000000007
using namespace std;

vector <ll> p[500005];
bool flag[500005];
ll n,m,v,u,sum;

inline ll jia(ll a,ll b){
	return ((a%wo)+(b%wo))%wo;
}

inline ll chen(ll a,ll b){
	return ((a%wo)*(b%wo))%wo;
}

ll jie(ll n){
	ll sum=1;
	for(int i=1;i<=n;i++){
		sum=chen(sum,i);
	}
	return sum;
}

ll ins(ll n){
	ll sum=0;
	if(n){
		for(int i=1;i<=n;i++){
			sum=jia(sum,jie(n)/(chen(jie(i),jie(n-i))));
		}
		return sum+1;
	}
	return 1;
}

ll dfs(ll s,ll n,ll r){
	for(int i=0;i<p[n].size();i++){
		if(!flag[p[n][i]]){
			flag[p[n][i]]=1;
			dfs(s,p[n][i],r+1);
			flag[p[n][i]]=0;
		}
		if(n!=s){
			sum=jia(sum,chen(ins(m-r+1),ins(r-1)));
		}
	}
}

int main(){
	
	cin.tie(0);
	
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	
	cin>>n>>m;
	
	for(int i=1;i<=m;i++){
		cin>>u>>v;
		p[u].push_back(v);
		p[v].push_back(u);
	}
	
	for(int i=1;i<=n;i++){
		flag[i]=1;
		dfs(i,i,0);
		flag[i]=0;
	}
	cout<<jia(sum/2,chen(n,ins(m)))<<'\n';
	
	return 0;
}
