#include<iostream>
using namespace std;
bool used[101][101];
int main(){
int n, m; cin >> n >> m;
for(int i = 0; i < m; i++){
int a,b; cin >> a >> b;
used[a][b] = used[b][a] = 1;
}
for(int i = 1; i <= n; i++){
for(int j = i+1; j <= n; j++){
if(used[i][j] == false){
cout << "NO\n";
return 0;
}
}
}
cout << "YES\n";
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgpib29sIHVzZWRbMTAxXVsxMDFdOwoKaW50IG1haW4oKXsKICBpbnQgbiwgbTsgY2luID4+IG4gPj4gbTsKICBmb3IoaW50IGkgPSAwOyBpIDwgbTsgaSsrKXsKICAgICBpbnQgYSxiOyBjaW4gPj4gYSA+PiBiOwogICAgIHVzZWRbYV1bYl0gPSB1c2VkW2JdW2FdID0gMTsKICB9CiAgZm9yKGludCBpID0gMTsgaSA8PSBuOyBpKyspewogICAgIGZvcihpbnQgaiA9IGkrMTsgaiA8PSBuOyBqKyspewogICAgICAgIGlmKHVzZWRbaV1bal0gPT0gZmFsc2UpewogICAgICAgICAgIGNvdXQgPDwgIk5PXG4iOwogICAgICAgICAgIHJldHVybiAwOwogICAgICAgIH0KICAgICB9CiAgfQogIGNvdXQgPDwgIllFU1xuIjsKICByZXR1cm4gMDsKfQ==