U.A. high school is conducting a team contest. There can only be a team of 3 members. There are N students in section 1A, but there can only be a single team from 1A. Also, there are students who are friends with each other and some who aren't. So, only those 3 will be willing to form a team if all 3 are friends with each other, ie, 1 is with 2, 2 with 3 and 3 with 1.
Count the total number of possible team triplets.
Input Format:
First line contains T, number of test cases.
First line of each test case contains N and M, number of students and number of friend pairs respectively.
Each of the next M lines of each test case contains U and V, denoting that U and V are friends.
Output Format:
Output the required answer of each test case in separate lines.
Constraints:
1≤T≤5
1≤N≤104
1≤M≤105
1≤U,V≤N
Possible triplets are {1, 2, 3} and {2, 3, 4}.