import java.util.Arrays; import java.util.LinkedList; import java.util.Scanner; public class Main { public static long MOD = 1000000007; public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int N = sc.nextInt(); final int M = sc.nextInt(); int[] degs = new int[N]; for(int i = 0; i < M; i++){ final int a = sc.nextInt(); final int b = sc.nextInt(); degs[a]++; degs[b]++; } 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"); } } }