Score : $200$ points
You are given a simple undirected graph with $N$ vertices and $M$ edges. The vertices are numbered $1, \dots, N$, and the $i$-th $(1 \leq i \leq M)$ edge connects Vertex $U_i$ and Vertex $V_i$.
Find the number of tuples of integers $a, b, c$ that satisfy all of the following conditions:
Input is given from Standard Input in the following format:
$N$ $M$ $U_1$ $V_1$ $\vdots$ $U_M$ $V_M$
Print the answer.
5 6 1 5 4 5 2 3 1 4 3 5 2 5
2
$(a, b, c) = (1, 4, 5), (2, 3, 5)$ satisfy the conditions.
3 1 1 2
0
7 10 1 7 5 7 2 5 3 6 4 7 1 5 2 4 1 3 1 6 2 7
4