#include #include #include using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int n, m; cin >> n >> m; vector> line(150000, {0, 0}); vector stop(150000, false); for (int i = 0; i < m; i++) { int s, t; cin >> s >> t; line[m][0] = s; line[m][1] = t; stop[s] = !stop[s]; stop[t] = !stop[t]; } int count = 0; string yes = "YES"; for (int i = 0; i < m; i++) { if (stop[line[m][0]] && stop[line[m][1]]) { yes = "NO"; break; } else if (stop[line[m][0]] || stop[line[m][1]]) { count++; if (count >= 3) { yes = "NO"; break; } } } cout << yes << "\n"; int a; cin >> a; }