intmain() { int m; std::cin >> n >> m; pw2[0] = 1; for (int i = 1; i < M; ++ i) adj(pw2[i] = (pw2[i - 1] << 1) - Mod); for (int i = 1, u, v; i <= m; ++ i) std::cin >> u >> v, edg[-- u][-- v] ++; for (int s = 1; s < (1 << n); ++ s) for (int u = 0; u < n; ++ u) for (int v = 0; v < n; ++ v) if ((s >> u & 1) && (s >> v & 1)) in[s] += edg[u][v]; for (int s = 1; s < (1 << n); ++ s) for (int u = 0; u < n; ++ u) for (int v = 0; v < n; ++ v) if (s >> v & 1) to[s][u] += edg[v][u]; g[0] = Mod - 1; auto calclink = [&](int s1, int s2) { int res = 0; while (s2) res += to[s1][ctz(s2)], s2 ^= s2 & -s2; return res; }; for (int s = 1; s < (1 << n); ++ s) { g[s] = pw2[in[s]]; for (int frm = s & (s - 1); frm; frm = (frm - 1) & s) adj(g[s] -= (LL) g[frm] * pw2[in[s ^ frm]] % Mod * pw2[calclink(s ^ frm, frm)] % Mod); } for (int s = 1; s < (1 << n); ++ s) { f[s] = g[s]; int le = ctz(s); for (int frm = s & (s - 1); frm; frm = (frm - 1) & s) if (frm >> le & 1) f[s] = (f[s] + (LL) f[frm] * g[s ^ frm]) % Mod; } std::cout << f[(1 << n) - 1] << std::endl; return0; }