You are given a connected simple undirected graph with vertices and edges. The vertices are numbered from through .
Choose three distinct edges to destroy with a ray. The chosen edges must satisfy both conditions below.
The ray removes only edges, not vertices. In particular, a graph with an isolated vertex after the removal is considered disconnected.
Count the sets of three edges satisfying the conditions. Different orders of choosing the same three edges are counted only once.
The input is given in the following format:
For each test case, print the number of edge sets satisfying the conditions.
Each test case is given in the following format:
The -th edge connects vertices and .
| 4 | 19 | The sum of over all test cases is at most . |
| 5 | 33 | No additional constraints. |