{"problem":{"name":"Everyone is Friends","description":{"content":"There are $N$ people numbered $1,2,\\ldots,N$. $M$ parties were held. $k_i$ people attended the $i$\\-th $(1\\leq i \\leq M)$ party, and they were People $x_{i,1},x_{i,2},\\ldots,x_{i,k_i}$. Determine if e","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc272_b"},"statements":[{"statement_type":"Markdown","content":"There are $N$ people numbered $1,2,\\ldots,N$.\n$M$ parties were held. $k_i$ people attended the $i$\\-th $(1\\leq i \\leq M)$ party, and they were People $x_{i,1},x_{i,2},\\ldots,x_{i,k_i}$.\nDetermine if every two people attended the same party at least once.\n\n## Constraints\n\n*   $2\\leq N \\leq 100$\n*   $1\\leq M \\leq 100$\n*   $2\\leq k_i \\leq N$\n*   $1\\leq x_{i,1}<x_{i,2}<\\ldots < x_{i,k_i}\\leq N$\n*   All values in the input are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$ $M$\n$k_1$ $x_{1,1}$ $x_{1,2}$ $\\ldots$ $x_{1,k_1}$\n$\\vdots$\n$k_M$ $x_{M,1}$ $x_{M,2}$ $\\ldots$ $x_{M,k_M}$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc272_b","tags":[],"sample_group":[["3 3\n2 1 2\n2 2 3\n2 1 3","Yes\n\nBoth Person $1$ and Person $2$ attended the $1$\\-st party.\nBoth Person $2$ and Person $3$ attended the $2$\\-nd party.\nBoth Person $1$ and Person $3$ attended the $3$\\-rd party.\nTherefore, every two people attended the same party at least once, so the answer is `Yes`."],["4 2\n3 1 2 4\n3 2 3 4","No\n\nPerson $1$ and Person $3$ did not attend the same party, so the answer is `No`."]],"created_at":"2026-03-03 11:01:14"}}