import java.util.*;
import java.lang.*;
import java.io.*;

class Main
{
	static boolean[][] used = new boolean[101][101];
	static Scanner sc = new Scanner(System.in);
	
	public static void main (String[] args) throws java.lang.Exception
	{
		int n, m;
		n = sc.nextInt();
		m = sc.nextInt();
		for(int i = 0; i < m; i++){
	     	int a, b;
	     	a = sc.nextInt();
	     	b = sc.nextInt();
	    	used[a][b] = used[b][a] = true;
	  	}
		for(int i = 1; i <= n; i++){
	    	for(int j = i+1; j <= n; j++){
	    		if(used[i][j] == false){
	    			System.out.println("NO");
	           		return;
	        	}
	    	}
	  	}
	  	System.out.println("YES");
	}
}