#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n, m; cin >> n >> m; vector> graph(n); vector degree(n, 0); for (int i = 0; i < m; ++i) { int u, v; cin >> u >> v; --u; --v; graph[u].push_back(v); graph[v].push_back(u); ++degree[u]; ++degree[v]; } for (int d : degree) { if (d & 1) { cout << "No\n"; return 0; } } for (int d : degree) { if (d >= 6) { cout << "Yes\n"; return 0; } } vector four; for (int v = 0; v < n; ++v) { if (degree[v] == 4) four.push_back(v); } if (four.size() >= 3) { cout << "Yes\n"; return 0; } if (four.size() <= 1) { cout << "No\n"; return 0; } const int start = four[0], forbidden = four[1]; vector visited(n, false); stack> work; for (int to : graph[start]) { if (to != forbidden) work.push({to, start}); } visited[start] = true; bool found_cycle_avoiding_other = false; while (!work.empty()) { auto [v, parent] = work.top(); work.pop(); if (v == start) { found_cycle_avoiding_other = true; break; } if (v == forbidden || visited[v]) continue; visited[v] = true; for (int to : graph[v]) { if (to != parent) work.push({to, v}); } } cout << (found_cycle_avoiding_other ? "Yes\n" : "No\n"); return 0; }