#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 22;
int n, m, cur = 1;
int col[N], lik[N];
vector<int> G[N];
bool mark[N], ban[N];
set<int> W[N];
bool CP(int x, int y) {
  vector<int> v1 = G[x], v2 = G[y];
  vector<int>::iterator it;
  it = lower_bound(v1.begin(), v1.end(), y);
  if (it == v1.end() || (*it) != y) return false;
  v1.erase(it);
  it = lower_bound(v2.begin(), v2.end(), x);
  if (it == v2.end() || (*it) != x) return false;
  v2.erase(it);
  return (v1 == v2);
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < (m); i++) {
    int x, y;
    cin >> x >> y;
    x--, y--;
    G[x].push_back(y);
    G[y].push_back(x);
  }
  for (int i = 0; i < (n); i++) sort(G[i].begin(), G[i].end()), lik[i] = i;
  for (int i = 0; i < (n); i++) {
    if (ban[i]) continue;
    for (int j = 0; j < (G[i].size()); j++) {
      if (CP(i, G[i][j])) {
        lik[G[i][j]] = i;
        ban[G[i][j]] = true;
      }
    }
  }
  for (int i = 0; i < (n); i++) {
    if (ban[i]) continue;
    for (int j = 0; j < (G[i].size()); j++)
      if (lik[G[i][j]] != lik[i]) W[i].insert(lik[G[i][j]]);
  }
  for (int i = 0; i < (n); i++) {
    if (W[i].size() > 2) return cout << "NO", 0;
    if (ban[i] || mark[i] || W[i].size() == 2) continue;
    if (W[i].size() == 0) {
      col[i] = cur, cur += 2, mark[i] = true;
    } else {
      mark[i] = true;
      col[i] = cur++;
      int t = (*W[i].begin()), pre = i;
      while (22) {
        W[t].erase(pre);
        mark[t] = true;
        col[t] = cur++;
        pre = t;
        if (W[t].size() == 0) break;
        t = (*W[t].begin());
      }
      cur++;
    }
  }
  for (int i = 0; i < (n); i++)
    if (!mark[i] && !ban[i]) return cout << "NO", 0;
  cout << "YES\n";
  for (int i = 0; i < (n); i++) cout << col[lik[i]] << " ";
  return 0;
}
