{"problem":{"name":"Three Circuits","description":{"content":"You are given a simple connected undirected graph consisting of $N$ vertices and $M$ edges. The vertices are numbered $1$ to $N$, and the edges are numbered $1$ to $M$. Edge $i$ connects Vertex $a_i$ ","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"agc032_c"},"statements":[{"statement_type":"Markdown","content":"You are given a simple connected undirected graph consisting of $N$ vertices and $M$ edges. The vertices are numbered $1$ to $N$, and the edges are numbered $1$ to $M$.\nEdge $i$ connects Vertex $a_i$ and $b_i$ bidirectionally.\nDetermine if three circuits (see Notes) can be formed using each of the edges exactly once.\n\n## Constraints\n\n*   All values in input are integers.\n*   $1 \\leq N,M \\leq 10^{5}$\n*   $1 \\leq a_i, b_i \\leq N$\n*   The given graph is simple and connected.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $M$\n$a_1$ $b_1$\n$:$\n$a_M$ $b_M$\n\n[samples]\n\n## Notes\n\nA circuit is a cycle allowing repetitions of vertices but not edges.","is_translate":false,"language":"English"}],"meta":{"iden":"agc032_c","tags":[],"sample_group":[["7 9\n1 2\n1 3\n2 3\n1 4\n1 5\n4 5\n1 6\n1 7\n6 7","Yes\n\n*   Three circuits can be formed using each of the edges exactly once, as follows:\n    \n    ![image](https://img.atcoder.jp/agc031/b8c8e2245d45a31cf39749b0a49fc2bd.png)"],["3 3\n1 2\n2 3\n3 1","No\n\n*   Three circuits are needed."],["18 27\n17 7\n12 15\n18 17\n13 18\n13 6\n5 7\n7 1\n14 5\n15 11\n7 6\n1 9\n5 4\n18 16\n4 6\n7 2\n7 11\n6 3\n12 14\n5 2\n10 5\n7 8\n10 15\n3 15\n9 8\n7 15\n5 16\n18 15","Yes"]],"created_at":"2026-03-03 11:01:14"}}