SELA
문제
In a far away country there is a wide river, N villages on the left and N villages on the right side of this river (denoted by 1..N on each side). There are also M small ships, each of them connecting one village from the left and one village from the right side (in both ways).
You are to organize a film festival in four of these villages: two from the left and two from the right side. Each two of these four villages must be connected by a ship (directly) if they belong to opposite sides of the river.
Help yourself to choose these four villages and first find out; in how many ways can you choose them?
입력
First line of input contains two positive integers N (2 ≤ N ≤ 1000), number of villages on every side of river, and M (4 ≤ M ≤ N2), number of small ships.
Next M lines contain two integers, both from interval [1, N], representing the village from the left and the village from the right side connected by this ship.
출력
In one and only line of output print the required number of ways to choose villages for the festival.
예제
예제 1
3 4 1 2 1 3 2 2 2 3
1
예제 2
3 7 1 1 1 3 2 1 2 3 3 1 3 2 3 3
3