//barrack
#include<bits/stdc++.h>
using namespace std;
#define int long long 
int n,m;
int aa[1000005];
signed main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	cin>>n>>m;
	for(int i=1;i<=m;i++){
		int a,b;
		cin>>a>>b;
		aa[a]++;
		aa[b]++;
	}
	int ans=n;
	int sum=1;
	for(int i=1;i<=n;i++) if(aa[i]==0) ans--;
	for(int i=1;i<=ans;i++) sum*=5;
	cout<<sum;
	return 0;
}
