#include<iostream>
#include<vector>
#define ll long long
using namespace std;
int read(){
	int w=0,f=1;
	char c=getchar();
	if(c<'0'||c>'9'){
		f=-1;
		c=getchar();
	}
	while(c>='0'&&c<='9'){
		w=w*10+c-'0';
		c=getchar();
	}
	return w*f;
}
void write(int x){
	if(x<0){
		putchar('-');
		x*=-1;
	}
	if(x>=10){
		write(x/10);
	}
	putchar(x%10+'0');
}
const int N=2*1e6+5;
const ll mod=1e9+7;
vector<int> g[N];
int n,m;
int c(int x,int y){
	if(x==y){
		return 1;
	}
	ll ans1=1,ans2=1,ans3=1;
	for(int i=1;i<=x;i++){
		ans1*=i;
	}
	for(int i=1;i<=y-x;i++){
		ans2*=i;
	}
	for(int i=1;i<=y;i++){
		ans3*=i;
	}
	//cout<<ans1<<" "<<ans3<<" "<<ans2<<endl;
	return ans3/ans1/ans2;
}
int main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	n=read(),m=read();
	for(int i=1;i<=m;i++){
		int x=read(),y=read();
		g[x].push_back(y);
		g[y].push_back(x);
	}
	ll ans=0;
	for(int i=1;i<=m;i++){
		ans+=c(i,m);
	}
	//cout<<ans<<endl;
	ans%=mod;
	ans*=n*2;
	ans+=c(2,n);
	ans%=mod;
	write(ans);
	putchar(10);
	return 0;
}
