{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"In a city there are **n** voters, and **m** people formed the Govt. council. The council members are numbered from **1** to **m**. Now everyone is complaining that the council is biased. So, they made a plan. The plan is that the voters are given a chance to vote again to form the new council. A vote will be like **\u0026plusmn;i \u0026plusmn;j**. **\u0027+\u0027** means the voter wants that member to be in the council, **\u0027-\u0027** means the voter doesn\u0027t want the member to be in the council. For example, there are 4 voters, they voted like \u003cul class\u003d\"full\"\u003e\u003cli\u003e\u003cstrong style\u003d\"font-size: 12pt;\"\u003e+1 -3\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;**\u003cspan style\u003d\"font-size: 12pt;\"\u003ethe voter wants member 1 to be kept in the council or member 3 to be thrown out\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cstrong style\u003d\"font-size: 12pt;\"\u003e+2 +3\u0026nbsp;\u0026nbsp;**\u003cspan style\u003d\"font-size: 12pt;\"\u003ethe voter wants member 2 to be kept in the council or member 3 to be kept in the council\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cstrong style\u003d\"font-size: 12pt;\"\u003e-1 -2\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;**\u003cspan style\u003d\"font-size: 12pt;\"\u003ethe voter wants member 1 to be thrown out or member 2 to be thrown out\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cstrong style\u003d\"font-size: 12pt;\"\u003e-4 +1\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;**\u003cspan style\u003d\"font-size: 12pt;\"\u003ethe voter wants member 4 to be thrown out or member 1 to be kept in the council\u003c/span\u003e\u003c/li\u003e \u003c/ul\u003e A voter will be satisfied if at least one of his wishes becomes true. Now your task is to form the council such that all the voters are happy."}},{"title":"Input","value":{"format":"MD","content":"Input starts with an integer **T (\u0026le; 20)**, denoting the number of test cases.\n\nEach case starts with a line containing two integers **n (1 \u0026le; n \u0026le; 20000)** and **m (1 \u0026le; m \u0026le; 8000)**. Each of the next **n** lines contains a vote in the form **\u0026plusmn;i \u0026plusmn;j (1 \u0026le; i, j \u0026le; m)**."}},{"title":"Output","value":{"format":"MD","content":"For each case, print the case number and **\u0027Yes\u0027** if a solution exists, or **\u0027No\u0027** if there is no solution. Then if the result is yes, print another line containing the number of members in the council followed by the members in ascending order. And print a single space between two numbers. There can be many solutions. Any valid one will do."}},{"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\u003e3\n4 3\n+1 +3\n+2 -1\n+2 -3\n-1 -2\n4 2\n+1 -2\n+1 +2\n-1 -2\n-1 +2\n1 3\n+1 -3\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1: Yes\n2 2 3\nCase 2: No\nCase 3: Yes\n0\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"MD","content":"This is a special judge problem. Wrong output format may cause wrong answer."}}]}