In competition, participants are competing against each other for the top two spots. There are friendly relations between participants. In each friendship relation, you will be given two integers and , indicating and are friends.
Note
Now, the jury has to decide the winners for the top two spots but he does not want to select both participants from the same friend circle so the competition seems fairer. Find the number of ways in which he can do so.
Input format
Output format
For each test case, print a single line denoting the number of ways in which the jury can choose the top two participants.
Constraints
Sum of over all test cases does not exceed 200000 and will not exceed 500000
1 and 3 are form a friend circle.
Following are the 4 possible ways: (1,2),(2,1),(1,3) and (3,1).