#include #define FOR(i,bg,ed) for(ll i=(bg);i<(ed);i++) #define REP(i,n) FOR(i,0,n) #define MOD 1000000007 #define int long long using namespace std; typedef long long ll; typedef vector> mat; const int INF = 1e9; signed main() { int N, M; int a, b; int g[55][55] = {}; cin >> N >> M; REP(i,M) { cin >> a >> b; g[a][b] = g[b][a] = 1; } int ans = 0; REP(i,50) REP(j,50) REP(k,50) REP(l,50) { if ((set{i, j, k, l}).size() == 4 && g[i][j] && g[j][k] && g[k][l] && g[l][i] && !g[i][k] && !g[j][l]) { ans++; } } cout << ans / 8 << endl; }