#include<bits/stdc++.h>

using namespace std;

#define  GODSPEED       ios:: sync_with_stdio(0);cin.tie(0);cout.tie(0);cout<<fixed;cout<<setprecision(15);
#define  f              first
#define  s              second
#define  newl           cout<<"\n";
#define  pb             push_back
#define  mset(a,x)      memset(a,x,sizeof(a))
#define  debv(a)        for(auto it: a)cout<<it<<" ";newl;
#define  deb1(a)        cout<<a<<"\n";
#define  deb2(a,b)      cout<<a<<" "<<b<<"\n";
#define  deb3(a,b,c)    cout<<a<<" "<<b<<" "<<c<<"\n";
#define  deb4(a,b,c,d)  cout<<a<<" "<<b<<" "<<c<<" "<<d<<"\n";
#define  uniq(a)        a.resize(unique(a.begin(), a.end()) - a.begin());
#define  all(a)         a.begin(),a.end()

typedef  long long             ll;
typedef  long double           ld;
typedef  pair<ll, ll>           pll;
typedef  vector<ll>            vll;
typedef  vector<pll>           vpll;

const ll   N     =  1e5 + 5;
const ll   mod   =  1e9 + 7;
const ll   INF   =  0x7f7f7f7f7f7f7f7f;
const int  INFi  =  0x7f7f7f7f;
const ll   LEVEL =  log2(N) + 1;

ll n, m, d[25][25], vis[25], ans = 0, v[25];
vector <int> s;

void dfs(int x) {
	vis[x] = 1;
	s.pb(x);
	for (int i = 1; i <= n; i++) {
		if (vis[i] == 1 || d[x][i] == 0) continue;
		dfs(i);
	}
}

void rec(int i) {
	if (i == s.size()) {
		ans++;
		return;
	}
	vector <int> p(n + 1, 0);
	if (v[s[i]] == 7) return;
	for (int k = 1; k <= n; k++) p[k] = v[k];
	for (int j = 0; j < 3; j++) {
		if (v[s[i]]&(1<<j)) continue;
		for (int k = 1; k <= n; k++) {
			if (d[s[i]][k] == 0) continue;
			v[k] |= (1<<j);
		}
		rec(i + 1);
		for (int k = 1; k <= n; k++) v[k] = p[k];
	}
}

void solve() {
	cin >> n >> m;
	for (int i = 1; i <= m; i++) {
		int a, b; cin >> a >> b;
		d[a][b] = d[b][a] = 1;
	}
	ll res = 1;
	for (int i = 1; i <= n; i++) {
		if (vis[i] == 0) {
			s.clear();
			ans = 0;
			dfs(i);
			rec(0);
			res *= ans;
		}
	}
	deb1(res)
}

int main() {
	GODSPEED;
	int test = 1;
	// cin >> test;
	for (int i = 1; i <= test; i++) {
		solve();
	}
}
#include<bits/stdc++.h>

using namespace std;
using ll = long long;
using pint = pair<ll,ll>;




vector<ll> bipartite(const vector<vector<ll>>& hen) {
	ll n = hen.size();
	vector<ll> col(n, -1);
	col[0] = 0;
	stack<ll> st;
	for(ll i = n - 1; i >= 0; i--) st.push(i);
	while(st.size()) {
		ll v = st.top(); st.pop();
		// print(v);
		if(col[v] == -1) col[v] = 0;
		for(auto i : hen[v]) {
			if(col[i] != -1) {
				if(col[i] == col[v]) return {-1};
				continue;
			} else {
				col[i] = !col[v];
				st.push(i);
			}
		}
		// print(col);
	}
	vector<ll> red;
	red.reserve(count(col.begin(), col.end(), 0));
	for(ll i = 0; i < (ll)col.size(); i++) if(col[i] == 0) red.push_back(i);
	return red;
}


#pragma region UnionFind
#define UNIONFIND
class UnionFind{
  private:
	vector<ll> data;
  public:
	UnionFind(ll n) : data(n,-1) {}
	ll root(ll i) { return data[i] < 0 ? i : data[i] = root(data[i]); }
	ll size(ll i) { return -data[root(i)]; }
	bool same(ll x, ll y) {return root(x) == root(y); }
	bool connected() {return size(0) == (ll)data.size(); }

	bool unit(ll i,ll j){
		i = root(i);
		j = root(j);
		if(i != j){
			data[i] += data[j];
			data[j] = i;
		}
		return i != j;
	}
};
#pragma endregion

#define bitget(n,k) (((n)>>(k))&1) /*nのk bit目*/


int main()
{
	ll N, M; cin >> N >> M;
	vector<vector<ll>> hen(N);
	for(ll i = 0; i < M; i++) {
		ll u, v; cin >> u >> v;
		u--,v--;
		hen[u].push_back(v);
		hen[v].push_back(u);
	}



	ll sum = 0;

	for(ll bit = 0; bit < (1<<N); bit++) {
		vector<ll> vers;
		vector<vector<ll>> edge(N);

		bool ok = true;
		for(ll i = 0; i < N; i++) {
			if(bitget(bit, i)) {

				for(auto j : hen[i]) {
					if(bitget(bit, j)) {
						ok = false;
						break;
					}
				}

			} else {

				for(auto j : hen[i]) {
					if(bit & (1<<j)) continue;
					edge[i].push_back(j);
				}

			}
		}

		if(ok == false)continue;

		// print(bit, edge);


		auto v = bipartite(edge);
		if(v == vector<ll>{-1})continue;

		UnionFind uni(N);

		for(ll i = 0; i < N; i++) {
			for(auto j : edge[i]) {
				uni.unit(i, j);
			}
		}

		set<ll> st;
		for(ll i = 0; i < N; i++) {
			if(bit & (1<<i))continue;
			st.insert(uni.root(i));
		}
		sum += (1LL<<(int)st.size());
	}

	cout << sum << endl;

}
