{"raw_statement":[{"iden":"problem statement","content":"You are given a simple undirected graph $G$ with $N$ vertices numbered $1$ to $N$. $G$ has $M$ edges and the $i$\\-th edge connects vertices $A_i$ and $B_i$.\nCheck if $G$ satisfies the following condition:\n\n*   For every subset $X$ of the vertex set ${1,2,\\cdots,N}$, there exists a subset $Y$ of $X$ such that $|Y|\\ge \\frac{|X|}{2}$ and $Y$ forms a clique.\n\nYou have $T$ testcases to solve."},{"iden":"constraints","content":"*   $1\\le T \\le 10^3$\n*   $1\\le N \\le 10^5$\n*   $0 \\le M \\le 10^6$\n*   $1 \\le A_i,B_i \\le N$\n*   The given graph doesn't contain self-loops or multiple edges.\n*   The sum of $N$ across the test cases in a single input is at most $10^5$.\n*   The sum of $M$ across the test cases in a single input is at most $10^6$.\n*   All input values are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$T$\n$case_1$\n$case_2$\n$\\vdots$\n$case_T$\n\nEach test case is given in the following format:\n\n$N$ $M$\n$A_1$ $B_1$\n$A_2$ $B_2$\n$\\vdots$\n$A_M$ $B_M$"},{"iden":"sample input 1","content":"4\n3 3\n1 2\n1 3\n2 3\n3 2\n1 2\n1 3\n3 1\n1 2\n3 0"},{"iden":"sample output 1","content":"Yes\nYes\nYes\nNo\n\nFor the $1$\\-st test case, $G$ satisfies the condition. In this case, every subset $X$ is a clique, so we can just let $Y=X$.\nFor the $2$\\-nd test case, $G$ satisfies the condition. For example, for $X={2,3}$, we can let $Y={2}$.\nFor the $4$\\-th test case, $G$ doesn't satisfy the condition. If we let $X={1,2,3}$, no subset $Y$ of $X$ satisfies the condition."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}