#ifndef TheCodeWasMadeByMooos
#define TheCodeWasMadeByMooos
#include<bits/stdc++.h>
#define endl '\n'
#define QAQ(n, m) for(ll i = n; i <= m; ++i)
#define QWQ(n, m) for(ll j = n; j <= m; ++j)
#define For(i, n, m) for(ll i = n; i <= m; ++i)
#define uQWQ(n, m) for(ll j = n; j >= m; --j)
#define uQAQ(n, m) for(ll i = n; i >= m; --i)
#define uFor(i, n, m) for(ll i = n; i >= m; --i)
#define FOpen(x) freopen (#x".in", "r", stdin), freopen (#x".out", "w", stdout)
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
const ll mod = 1000000007;
ll n, m, Ans, u[20], v[20], Fa[20];
inline ll Find (ll x) { return (Fa[x] == x ? x : Fa[x] = Find (Fa[x])); }
int main () {
	FOpen (barrack), cin.tie (0), ios::sync_with_stdio (false);
	cin >> n >> m;
	if (n <= 8) {
		QAQ (1, m) cin >> u[i] >> v[i];
		QAQ (1, (1ll << n) - 1) QWQ (0, (1 << m) - 1) {
			For (B, 0, m - 1) {
				For (k, 1, n) Fa[k] = k;
				For (k, 0, m - 1) if (k != B || (j >> k) % 2 == 1) {
					static ll Fau, Fav;
					Fau = Find (u[k + 1]), Fav = Find (v[k + 1]);
					if (Fau != Fav) Fa[Fau] = Fa[Fav];
				}
				ll Common = 0;
				For (k, 0, n - 1) if ((i >> k) & 1) {
					if (!Common) Common = Find (k + 1);
					else if (Find (k + 1) != Common) {
						Common = -1;
						break;
					}
				}
				if (Common == -1) goto WrongAnswer;
			}
			++Ans;
			WrongAnswer:;
		}
		cout << Ans << endl;
		return 0;
	}
}

#endif