Triangle
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Problem Statement
You are given a simple undirected graph with vertices and edges. The vertices are numbered , and the -th edge connects Vertex and Vertex .
Find the number of tuples of integers that satisfy all of the following conditions:
- There is an edge connecting Vertex and Vertex .
- There is an edge connecting Vertex and Vertex .
- There is an edge connecting Vertex and Vertex .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
Sample Input 1
5 6
1 5
4 5
2 3
1 4
3 5
2 5
Sample Output 1
2
satisfy the conditions.
Sample Input 2
3 1
1 2
Sample Output 2
0
Sample Input 3
7 10
1 7
5 7
2 5
3 6
4 7
1 5
2 4
1 3
1 6
2 7
Sample Output 3
4