#include using namespace std; /*/ #include using namespace atcoder; //*/ #define rep(i,n) for(int i=0;i; using ll = long long; using ull = unsigned long long; //*/ template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } typedef pair pii; typedef pair pll; typedef vector vll; typedef vector vint; bool vis[110]; int col[110]; void solve(){ int n,m; cin >> n >> m; rep(i,110) col[i] = -1; vector g(n); rep(i,m){ int u,v; cin>> u >> v; u--,v--; g[u].push_back(v); g[v].push_back(u); } queue q; q.push(0); col[0] = 0; while(!q.empty()){ int now = q.front(); q.pop(); for(int nxt : g[now]){ if(col[nxt] == -1){ col[nxt] = 1-col[now]; q.push(nxt); }else{ if(col[nxt] != 1-col[now]){ cout << "No" << endl; return; } } } } cout << "Yes" << endl; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t = 1; //cin >> t; rep(_,t) solve(); }