{"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":"\u003cdiv class\u003d\"panel_content\"\u003e\n There are some locations in a park, and some of them are connected by roads. The park manger needs to build some railways along the roads, and he would like to arrange tourist routes to each circuit. If a railway belongs to more than one tourist routes, there might be clash on it, and if a railway belongs to none tourist route, it doesn’t need to build.\n \u003cbr\u003eNow we know the plan, and can you tell us how many railways are no need to build and how many railways where clash might happen.\n\u003c/div\u003e\n有一个公园有n个景点,公园的管理员准备修建m条道路,并且安排一些形成回路的参观路线。如果一条道路被多条道路公用,那么这条路是冲突的;如果一条道路没在任何一个回路内,那么这条路是不冲突的 问分别有多少条有冲突的路和没有冲突的路"}},{"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","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\u003e\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\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003e1 5\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}