#include<bits/stdc++.h>
using namespace std;
#define gc getchar
inline int read(){
	int x=0;bool f=0;
	char c=gc();
	for(;c<'0'||c>'9';c=gc()) f|=(c=='-');
	for(;c>47&&c<58;c=gc()) x=(x<<3)+(x<<1)+(c&15);
	return (f?(~x)+1:x);
}
#define N 500005
#define M 1000006
#define ll long long
#define mod 1000000007
struct Edge{
	int to,pre;
}e[M<<1];int last[N],tot;
void add(int a,int b){
	e[++tot].to=b;
	e[tot].pre=last[a];
	last[a]=tot;
}
int n,m,a,b,kkkorz,chen_zheorz;
ll ans,p2[M];
int main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	srand(time(NULL));
	cin>>n>>m;
	for(int i=1;i<=m;i++){
		cin>>a>>b;
		add(a,b);
		add(b,a);
	}
	p2[0]=1;
	for(int i=1;i<=m;i++) p2[i]=p2[i-1]*2%mod;
	ans=1ll*rand()%mod*rand()%mod*rand()%mod*rand()%mod*rand()%mod*rand()%mod;
	//zhe yaoshi neng shang mihuo xingwei dashang,
	//wo dangchang jiu ba zhege diannao pingmu chidiao!!!!!
	cout<<ans<<endl;
	return 0;
}

