{"trustable":true,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003eLittle A is an astronomy lover, and he has found that the sky was so beautiful!\u003cbr\u003e\u003cbr\u003eSo he is counting stars now!\u003cbr\u003e\u003cbr\u003eThere are n stars in the sky, and little A has connected them by m non-directional edges.\u003cbr\u003e\u003cbr\u003eIt is guranteed that no edges connect one star with itself, and every two edges connect different pairs of stars.\u003cbr\u003e\u003cbr\u003eNow little A wants to know that how many different \"A-Structure\"s are there in the sky, can you help him?\u003cbr\u003e\u003cbr\u003eAn \"A-structure\" can be seen as a non-directional subgraph G, with a set of four nodes V and a set of five edges E.\u003cbr\u003e\u003cbr\u003eIf $V\u003d(A,B,C,D)$ and $E\u003d(AB,BC,CD,DA,AC)$, we call G as an \"A-structure\".\u003cbr\u003e\u003cbr\u003eIt is defined that \"A-structure\" $G_1\u003dV_1+E_1$ and $G_2\u003dV_2+E_2$ are same only in the condition that $V_1\u003dV_2$ and $E_1\u003dE_2$.\u003cbr\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"There are no more than 300 test cases.\u003cbr\u003e\u003cbr\u003eFor each test case, there are 2 positive integers n and m in the first line.\u003cbr\u003e\u003cbr\u003e$2\\le n \\le 10^5$, $1 \\le m \\le min(2 \\times 10^5,\\frac{n(n-1)}{2})$\u003cbr\u003e\u003cbr\u003eAnd then m lines follow, in each line there are two positive integers u and v, describing that this edge connects node u and node v.\u003cbr\u003e\u003cbr\u003e$1 \\leq u,v \\leq n$\u003cbr\u003e\u003cbr\u003e$\\sum{n} \\leq 3 \\times 10^5$,$\\sum{m} \\leq 6 \\times 10^5$\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"For each test case, just output one integer--the number of different \"A-structure\"s in one line.\u003cbr\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e4 5\r\n1 2\r\n2 3\r\n3 4\r\n4 1\r\n1 3\r\n4 6\r\n1 2\r\n2 3\r\n3 4\r\n4 1\r\n1 3\r\n2 4\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1\r\n6\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}