Navnit is a college student and there are $N$ students in his college .Students are numbered from $1$ to $N$.
You are given $M$ facts that "Student $A_i$ and $B_i$".The same fact can be given multiple times .If $A_i$ is a friend of $B_i$ ,then $B_i$ is also a friend of $A_i$ . If $A_i$ is a friend of $B_i$ and $B_i$ is a friend of $C_i$ then $A_i$ is also a friend of $C_i$.
Find number of ways in which two students can be selected in such a way that they are not friends. 

-----Input:-----
- First line will contain two integers $N$ and $M$. 
- Then $M$ lines follow. Each line contains two integers $A_i$ and $B_i$ denoting the students who are friends.

-----Output:-----
For each testcase, output the number of ways in which  two students can be selected in such a way that they are friends.

-----Constraints-----
- $2 \leq N \leq 200000$
- $0 \leq M \leq 200000$
- $1 \leq A_i,B_i \leq N$

-----Sample Input:-----
5 3
1 2                                                   
3 4
1 5

-----Sample Output:-----
6

-----EXPLANATION:-----
Groups of friend are $[1,2,5]$ and $[3,4]$.Hence the answer is  3 X 2 =6.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = '# cook your dish here\r\nfrom collections import defaultdict\r\nd=defaultdict(list)\r\ndef dfs(i):\r\n    p=0\r\n    nonlocal v\r\n    e=[i]\r\n    while(e!=[]):\r\n        p+=1\r\n        x=e.pop(0)\r\n        v[x]=1\r\n        for i in d[x]:\r\n            if v[i]==-1:\r\n                v[i]=1\r\n                e.append(i)\r\n    return p\r\n\r\nn,m=list(map(int,input().split()))\r\nfor i in range(n+1):\r\n    d[i]=[]\r\nfor _ in range(m):\r\n\ta,b=list(map(int,input().split()))\r\n\td[a].append(b)\r\n\td[b].append(a)\r\nv=[]\r\nfor i in range(n+1):\r\n    v.append(-1)\r\nc=0\r\np=[]\r\nfor i in range(1,n+1):\r\n    if v[i]==-1:\r\n        c+=1\r\n        p.append(dfs(i))\r\nan=0\r\ns=0\r\nfor i in range(c):\r\n    s+=p[i]\r\n    an+=p[i]*(n-s)\r\nprint(an)\r\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: