{"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\"\u003eGardon played in the maze castle designed by small Xi for a long time last time (see Problem B). Now she also wants to design a maze for Gardon to walk in. However, her design idea for the maze is different. Firstly, she thinks that all passages should be bidirectionally connected, which means if there is a passage connecting room A and B, then one can walk through it from room A to room B, and also from room B to room A. To increase the difficulty, small Xi hopes that any two rooms have only one path that can be connected (unless a detour is taken). Small Xi now gives you her design drawing and asks you to help judge whether her design drawing meets her design idea. For example, in the following example, the first two are in line with the requirements, but the last one has two ways to reach 8 from 5. \u003cbr\u003e\u003cimg style\u003d\"max-width:100%;\" src\u003d\"CDN_BASE_URL/7c61bfc595eb34a8d59c381054a09076?v\u003d1699972586\"\u003e\u003cbr\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The input contains multiple sets of data. Each set of data is a list of pairs of integers ending with 0 0, representing a passage connecting two room numbers. The room number is at least 1 and not more than 100,000. There is a blank line between each pair of data sets. \u003cbr\u003eThe entire file ends with two -1s.\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"For each set of input data, output only one line. If the maze meets small Xi\u0027s idea, output \"Yes\"; otherwise, output \"No\".\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\u003e6 8 5 3 5 2 6 4\r\n5 6 0 0\r\n\r\n8 1 7 3 6 2 8 9 7 5\r\n7 4 7 8 7 6 0 0\r\n\r\n3 8 6 8 6 4\r\n5 3 5 6 5 2 0 0\r\n\r\n-1 -1\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYes\r\nYes\r\nNo\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}}]}