#include #include #include #include #include #include using ll = long long; #define MOD 1000000007 using namespace std; bool tree[60][60]; bool f(bool a, bool b, bool c) { return (a || b || c) && (!a ^ b ^ c); } bool square(int v1, int v2, int v3, int v4) { if (f(tree[v1][v2], tree[v1][v3], tree[v1][v4])) { if (f(tree[v1][v2], tree[v2][v3], tree[v2][v4])) { if (f(tree[v3][v2], tree[v1][v3], tree[v3][v4])) { if (f(tree[v4][v2], tree[v4][v3], tree[v1][v4])) { return true; } } } } return false; } int main(){ int N, M, cnt = 0; cin >> N >> M; for(int i = 0; i < M; i++) { int a,b; cin >> a >> b; tree[a][b] = tree[b][a] = true; } for(int v1 = 0; v1 < N-3; v1++) { for(int v2 = v1 + 1; v2 < N-2; v2++) { for(int v3 = v2 + 1; v3 < N-1; v3++) { for(int v4 = v3 + 1; v4 < N; v4++) { if (square(v1,v2,v3,v4)) { cnt++; } } } } } cout << cnt << endl; return 0; }