#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
//#pragma GCC optimize ("-O3")
using namespace std;
void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }
//---------------------------------------------------------------------------------------------------
struct UnionFind {
	using T = int;
	const T def = 0;
	T f(T a, T b) { return a + b; }
	//==========================================
    vector<int> par; 
	vector<T> value;
    UnionFind() {}
    UnionFind(int NV) { init(NV); }
	void init(int NV) { par.clear(); rep(i, 0, NV) par.push_back(i); value.resize(NV, 1); }
    void reset() { rep(i, 0, par.size()) par[i] = i; }
	int operator[](int x) {
		if (par[x] == x) return x;
		else {
			int res = operator[](par[x]);
			if (res != par[x]) {
				value[res] = f(value[res], value[par[x]]);
				value[par[x]] = def;
			}
			return par[x] = res;
		}
	}
	// uf(x,y)->y
    void operator()(int x, int y) {
		x = operator[](x); y = operator[](y); 
		if (x != y) {
			value[y] += value[par[x]];
			value[par[x]] = def;
			par[x] = y;
		}
	}
	T getValues(int x) { return value[operator[](x)]; };
};
/*---------------------------------------------------------------------------------------------------
　　　　　　　　　　　 ∧＿∧
　　　　　 ∧＿∧ 　（´<_｀ ）　 Welcome to My Coding Space!
　　　　 （ ´_ゝ`）　/　 ⌒i     @hamayanhamayan0
　　　　／　　　＼　 　  |　|
　　　 /　　 /￣￣￣￣/　　|
　 ＿_(__ﾆつ/　    ＿/ .| .|＿＿＿＿
　 　　　＼/＿＿＿＿/　（u　⊃
---------------------------------------------------------------------------------------------------*/














int N, M;
vector<int> E[20];
//---------------------------------------------------------------------------------------------------
int vis[20];
void dfs2(int cu, vector<int>& arranged) {
	if (vis[cu]) return;
	vis[cu] = 1;

	arranged.push_back(cu);

	fore(to, E[cu]) dfs2(to, arranged);
}
//---------------------------------------------------------------------------------------------------
int col[20];
ll dfs(int _cu, vector<int>& vs) {
	if (_cu == vs.size()) return 1;
	int cu = vs[_cu];

	vector<int> cnt(3, 0);
	fore(to, E[cu]) if (0 <= col[to]) cnt[col[to]]++;

	int res = 0;
	rep(c, 0, 3) if (cnt[c] == 0) {
		col[cu] = c;
		res += dfs(_cu + 1, vs);
		col[cu] = -1;
	}
	return res;
}
ll get(vector<int> vs) {
	rep(i, 0, N) col[i] = -1;
	rep(i, 0, N) vis[i] = 0;

	vector<int> arrangedVs = vector<int>();
	dfs2(vs[0], arrangedVs);
	return dfs(0, arrangedVs);
}
//---------------------------------------------------------------------------------------------------
void _main() {
	cin >> N >> M;
	UnionFind uf(N);
	rep(i, 0, M) {
		int A, B; cin >> A >> B;
		A--; B--;
		uf(A, B);

		E[A].push_back(B);
		E[B].push_back(A);
	}

	map<int, vector<int>> grp;
	rep(i, 0, N) grp[uf[i]].push_back(i);
	ll ans = 1;
	fore(p, grp) ans *= get(p.second);
	cout << ans << endl;
}






#include <bits/stdc++.h>

using namespace std;

typedef int int2;
#define int long long
#define pi pair<int, int>
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define f first
#define s second
const int inf = 1e18;

int t;

const int maxn = 25;
int adj[maxn][maxn];
int n, m;
int color[maxn];

bool dfs(int u, int p, int col) { // returns if there is a cycle
    color[u] = col;
    // cout << "u: " << u << ", p: " << p << ", col: " << col << "\n";
    // cout << "color[u]: " << color[u] << "\n";
    for (int v = 0; v < n; v++) {
        if (adj[u][v]) {
            if (color[v] != -1) {
                if (v != p) {
                    if (color[v] == color[u]) return true;
                    if (color[v] == 0 and dfs(v, u, 3 - col)) return true;
                }
            }
        }
    }
    return false;
}

string encode(int mask) {
    string res;
    for (int i = 0; i < n; i++) {
        res += (char)('0' + ((mask & (1 << i)) >> i));
    }
    return res;
}

int2 main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cin >> n >> m;
    for (int i = 1; i <= m; i++) {
        int u, v;
        cin >> u >> v;
        u--, v--;
        adj[u][v] = adj[v][u] = 1;
    }
    int maxmask = (1 << n) - 1;
    // int maxmask = 0;
    int ans = 0;
    for (int mask = 0; mask <= maxmask; mask++) {
        // cout << "mask: " << encode(mask) << "\n";
        for (int i = 0; i < n; i++) {
            if (mask & (1 << i)) color[i] = -1;
        }
        int next_ans = 1;
        bool possible = true;
        for (int i = 0; i < n; i++) {
            if (mask & (1 << i)) {
                for (int j = 0; j < n; j++) {
                    if (mask & (1 << j)) {
                        if (adj[i][j]) {
                            possible = false;
                        }
                    }
                }
            }
        }
        if (!possible) {
            for (int i = 0; i < n; i++) {
                color[i] = 0;
            }
            continue;
        }
        for (int i = 0; i < n; i++) {
            if (!color[i]) {
                // cout << "i: " << i << "\n";
                // cout << "color[i]: " << color[i] << "\n";
                bool cycle = dfs(i, i, 1);
                if (cycle) {
                    possible = false;
                    break;
                }
                next_ans *= 2LL;
                // cout << "\n";
            }
        }
        for (int i = 0; i < n; i++) {
            color[i] = 0;
        }
        if (!possible) continue;
        // cout << "mask: " << encode(mask) << ", next_ans:" << next_ans << "\n";
        ans += next_ans;
    }
    cout << ans << "\n";
} 