Little boy Igor wants to become a traveller. At first, he decided to visit all the cities of his motherland — Uzhlyandia.

It is widely known that Uzhlyandia has *n* cities connected with *m* bidirectional roads. Also, there are no two roads in the country that connect the same pair of cities, but roads starting and ending in the same city can exist. Igor wants to plan his journey beforehand. Boy thinks a path is good if the path goes over *m* - 2 roads twice, and over the other 2 exactly once. The good path can start and finish in any city of Uzhlyandia.

Now he wants to know how many different good paths are in Uzhlyandia. Two paths are considered different if the sets of roads the paths goes over exactly once differ. Help Igor — calculate the number of good paths.
The first line contains two integers *n*, *m* (1 ≤ *n*, *m* ≤ 10<sup class="upper-index">6</sup>) — the number of cities and roads in Uzhlyandia, respectively.

Each of the next *m* lines contains two integers *u* and *v* (1 ≤ *u*, *v* ≤ *n*) that mean that there is road between cities *u* and *v*.

It is guaranteed that no road will be given in the input twice. That also means that for every city there is no more than one road that connects the city to itself.
In first sample test case the good paths are: 
 -  2 → 1 → 3 → 1 → 4 → 1 → 5, -  2 → 1 → 3 → 1 → 5 → 1 → 4, -  2 → 1 → 4 → 1 → 5 → 1 → 3, -  3 → 1 → 2 → 1 → 4 → 1 → 5, -  3 → 1 → 2 → 1 → 5 → 1 → 4, -  4 → 1 → 2 → 1 → 3 → 1 → 5. 
There are good paths that are same with displayed above, because the sets of roads they pass over once are same: 
 -  2 → 1 → 4 → 1 → 3 → 1 → 5, -  2 → 1 → 5 → 1 → 3 → 1 → 4, -  2 → 1 → 5 → 1 → 4 → 1 → 3, -  3 → 1 → 4 → 1 → 2 → 1 → 5, -  3 → 1 → 5 → 1 → 2 → 1 → 4, -  4 → 1 → 3 → 1 → 2 → 1 → 5, -  and all the paths in the other direction. 
Thus, the answer is 6.

In the second test case, Igor simply can not walk by all the roads.

In the third case, Igor walks once over every road.
5 4
1 2
1 3
1 4
1 5
6
5 3
1 2
2 3
4 5
0
2 2
1 1
1 2
1
4 5
1 4
3 4
1 2
2 3
2 4
8
7 13
6 7
2 7
3 7
4 3
5 2
1 4
7 7
3 1
5 5
3 3
1 5
2 6
6 6
57
100 10
87 73
15 71
14 33
1 4
20 80
65 67
36 36
25 4
22 21
7 97
0
1 1
1 1
0
4 4
2 3
2 4
3 4
4 4
6
1000000 1
255765 255765
0
10 9
8 10
3 10
2 8
9 3
4 8
1 10
7 9
5 4
7 3
12
4 2
1 1
1 2
1
4 2
3 3
3 4
1
5 5
1 4
3 4
1 2
2 3
2 4
8
5 5
1 1
2 2
3 3
4 4
5 5
0
5 3
1 1
2 2
3 3
0
4 3
1 2
2 3
4 4
0
5 4
1 2
3 3
4 4
5 5
0
4 4
1 2
2 3
1 3
4 4
0
3 3
1 1
2 2
3 3
0
6 12
1 2
1 3
2 3
1 1
2 2
3 3
4 5
5 6
4 6
4 4
5 5
6 6
0
5 4
3 3
4 4
5 5
1 2
0
4 4
1 2
2 3
3 1
4 4
0
3 3
1 1
2 3
3 3
0
7 3
1 1
3 3
6 6
0
2 2
1 1
2 2
0
5 4
1 1
2 3
2 4
2 5
0
4 3
1 1
2 3
3 4
0
10 10
1 2
2 3
3 4
4 5
5 1
6 6
7 7
8 8
9 9
10 10
0
3 3
1 2
2 2
3 3
0
class dsu:
    """Data structures and algorithms for disjoint set union problems.

    Given an undirected graph, it processes the following queries in O(alpha(n)) time (amortized).

    >   Edge addition

    >   Deciding whether given two vertices are in the same connected component

    Each connected component internally has a representative vertex.

    When two connected components are merged by edge addition, 
    one of the two representatives of these connected components becomes the representative of the new connected component.
    """

    __slots__ = ["n", "parent_or_size"]

    def __init__(self, n):
        """It creates an undirected graph with n vertices and 0 edges.

        Constraints
        -----------

        >   0 <= n <= 10 ** 8

        Complexity
        ----------

        >   O(n)
        """
        self.n = n
        self.parent_or_size = [-1] * n

    def merge(self, a, b):
        """It adds an edge (a, b).

        If the vertices a and b were in the same connected component, 
        it returns the representative of this connected component. 
        Otherwise, it returns the representative of the new connected component.

        Constraints
        -----------

        >   0 <= a < n 

        >   0 <= b < n

        Complexity
        ----------

        >   O(alpha(n)) amortized
        """
        # assert 0 <= a < self.n
        # assert 0 <= b < self.n
        x = self.leader(a)
        y = self.leader(b)
        if x == y:
            return x
        if self.parent_or_size[y] < self.parent_or_size[x]:
            x, y = y, x
        self.parent_or_size[x] += self.parent_or_size[y]
        self.parent_or_size[y] = x
        return x

    def same(self, a, b):
        """It returns whether the vertices a and b are in the same connected component.

        Constraints
        -----------

        >   0 <= a < n

        >   0 <= b < n

        Complexity
        ----------

        >   O(alpha(n)) amortized
        """
        # assert 0 <= a < self.n
        # assert 0 <= b < self.n
        return self.leader(a) == self.leader(b)

    def leader(self, a):
        """It returns the representative of the connected component that contains the vertex a.

        Constraints
        -----------

        >   0 <= a < n

        Complexity
        ----------

        >   O(alpha(n)) amortized
        """
        # assert 0 <= a < self.n
        path = []
        while self.parent_or_size[a] >= 0:
            path.append(a)
            a = self.parent_or_size[a]
        for child in path:
            self.parent_or_size[child] = a
        return a

    def size(self, a):
        """It returns the size of the connected component that contains the vertex a.

        Constraints
        -----------

        >   0 <= a < n

        Complexity
        ----------

        >   O(alpha(n)) amortized
        """
        # assert 0 <= a < self.n
        return -self.parent_or_size[self.leader(a)]

    def groups(self):
        """It divides the graph into connected components and returns the list of them.

        More precisely, it returns the list of the "list of the vertices in a connected component". 
        Both of the orders of the connected components and the vertices are undefined.

        Complexity
        ----------

        >   O(n)
        """
        result = [[] for _ in range(self.n)]
        for i in range(self.n):
            result[self.leader(i)].append(i)
        return [g for g in result if g]



N, M = map(int, input().split())
uf = dsu(N)
deg = [0 for _ in range(N)]
for _ in range(M):
    u, v = map(int, input().split())
    u -= 1; v -= 1
    uf.merge(u, v)
    if u != v:
        deg[u] += 1
        deg[v] += 1
    else:
        deg[u] += 1

if len(uf.groups()) > 1:
    print(0)
    exit()

ans = 0
for d in deg:
    ans += d * (d - 1) // 2

print(ans)
