#![allow(unused_imports)] use std::cmp::*; use std::collections::*; use std::io::Write; use std::ops::Bound::*; #[allow(unused_macros)] macro_rules! debug { ($($e:expr),*) => { #[cfg(debug_assertions)] $({ let (e, mut err) = (stringify!($e), std::io::stderr()); writeln!(err, "{} = {:?}", e, $e).unwrap() })* }; } fn main() { let v = read_vec::(); let (n, m) = (v[0], v[1]); let mut edges = vec![vec![]; n]; for i in 0..m { let v = read_vec::(); let (a, b) = (v[0] - 1, v[1] - 1); edges[a].push(b); edges[b].push(a); } let mut cand = BTreeSet::new(); for i in 0..n { if edges[i].len() == 1 && !cand.contains(&edges[i][0]) { cand.insert(i); } } let mut num = 0; while let Some(&i) = cand.iter().next() { if edges[i].is_empty() { cand.remove(&i); continue; } let to = edges[i][0]; edges[i].pop(); for j in 0..edges[to].len() { if edges[to][j] == i { edges[to].swap_remove(j); if edges[to].len() == 1 { cand.insert(to); } num += 1; break; } } cand.remove(&i); } if num % 2 == 1 { println!("Yes"); } else { println!("No"); } } fn read() -> T { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); s.trim().parse().ok().unwrap() } fn read_vec() -> Vec { read::() .split_whitespace() .map(|e| e.parse().ok().unwrap()) .collect() }