#include using namespace std; using ll = long long; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); //aとbは偶奇が異なっていないといけない int N, M, a, b; cin >> N >> M; vector> E(N+1); vector color(N+1, -1); for (int i=1; i<=M; i++){ cin >> a >> b; E[a].push_back(b); E[b].push_back(a); } auto dfs=[&](auto self, int from)->void{ for (auto to : E[from]){ if (color[to] != -1){ if (color[to] == color[from]){ cout << "No" << endl; exit(0); } continue; } color[to] = 1 - color[from]; self(self, to); } }; color[1] = 0; dfs(dfs, 1); cout << "Yes" << endl; return 0; }