{"trustable":false,"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":"托尔斯泰"}},{"title":"Input","value":{"format":"HTML","content":"The Input consists of multiple test cases. The first line of each test case contains two integers, n (0 \u0026lt; n \u0026lt;\u003d 10000), m (0 \u0026lt;\u003d m \u0026lt;\u003d 100000), which are the number of locations and the number of the railways. The next m lines, each line contains two integers, u, v (0 \u0026lt;\u003d u, v \u0026lt; n), which means the manger plans to build a railway on the road between u and v. \n\u003cbr\u003eYou can assume that there is no loop and no multiple edges. \n\u003cbr\u003eThe last test case is followed by two zeros on a single line, which means the end of the input."}},{"title":"Output","value":{"format":"HTML","content":"Output the number of railways that are no need to build, and the number of railways where clash might happen. Please follow the format as the sample."}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e8 10\n0 1\n1 2\n2 3\n3 0\n3 4\n4 5\n5 6\n6 7\n7 4\n5 7\n0 0\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e1 5\u003c/pre\u003e"}}]}