6.CANT DO WITHOUT GRAPH THEORY

Credits: 150

Graph theory is very important to any computer science individual and so we can do without graph theory .You will understand that fact with this simple question

PROBLEM DESCRIPTION:

Let us consider an undirected graph G = <V, E> which has N vertices and M edges. Incidence matrix of this graph is an N × M matrix A = {aij}, such that aij is 1 if i-th vertex is one of the ends of j-th edge and 0 in the other case. Your task is to find the sum of all elements of the matrix (AT)A where AT is A transposed, i.e. an M × N matrix obtained from A by turning its columns to rows and vice versa.

INPUT:

The first line of the input file contains two integer numbers — N and M (2 le N le 10,000, 1 le M le 100,000). 2M integer numbers follow, forming M pairs, each pair describes one edge of the graph. All edges are different and there are no loops (i.e. edge ends are distinct).

OUTPUT:

Output the only number — the sum requested.

SAMPLE INPUT:
4 4
1 2
1 3
2 3
2 4

SAMPLE OUTPUT:
18