#include #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; int main() { int n, m; cin >> n >> m; vector> to(n); rep(i, m) { int a, b; cin >> a >> b; --a; --b; to[a].push_back(b); to[b].push_back(a); } rep(i, n) { if (to[i].size() > 2) { puts("No"); return 0; } } puts("Yes"); return 0; }