import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.LinkedList; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int N = sc.nextInt(); final int M = sc.nextInt(); ArrayList> adj = new ArrayList>(); for(int i = 0; i < N; i++){ adj.add(new HashSet()); } int[] degs = new int[N]; for(int i = 0; i < M; i++){ final int a = sc.nextInt(); final int b = sc.nextInt(); adj.get(a).add(b); adj.get(b).add(a); degs[a]++; degs[b]++; } boolean[] visited = new boolean[N]; LinkedList queue = new LinkedList(); for(int i = 0; i < N; i++){ if(degs[i] > 0){ visited[i] = true; queue.add(i); break; } } while(!queue.isEmpty()){ final int node = queue.poll(); for(final int next : adj.get(node)){ if(visited[next]){ continue; } visited[next] = true; queue.add(next); } } //System.out.println(Arrays.toString(visited)); for(int i = 0; i < N; i++){ if(degs[i] > 0 && !visited[i]){ System.out.println("NO"); return; } } int odd_count = 0; for(int i = 0; i < N; i++){ if(degs[i] % 2 == 1){ odd_count++; } } if(odd_count == 0 || odd_count == 2){ System.out.println("YES"); }else{ System.out.println("NO"); } } }