{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"In order to make their sons brave, Jiajia and Wind take them to a big cave. The cave has n rooms, and one-way corridors connecting some rooms. Each time, Wind choose two rooms x and y, and ask one of their little sons go from one to the other. The son can either go from x to y, or from y to x. Wind promised that her tasks are all possible, but she actually doesn\u0027t know how to decide if a task is possible. To make her life easier, Jiajia decided to choose a cave in which every pair of rooms is a possible task. Given a cave, can you tell Jiajia whether Wind can randomly choose two rooms without worrying about anything?"}},{"title":"Input","value":{"format":"HTML","content":"The first line contains a single integer T, the number of test cases. And followed T cases.\r\u003cbr\u003e\r\u003cbr\u003eThe first line for each case contains two integers n, m(0 \u0026lt; n \u0026lt; 1001,m \u0026lt; 6000), the number of rooms and corridors in the cave. The next m lines each contains two integers u and v, indicating that there is a corridor connecting room u and room v directly.\r\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"The output should contain T lines. Write \u0027Yes\u0027 if the cave has the property stated above, or \u0027No\u0027 otherwise."}},{"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\u003e1\r\n3 3\r\n1 2\r\n2 3\r\n3 1\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYes\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}