#include <bits/stdc++.h>
using namespace std;
template <class T>
int getbit(T s, int i) {
  return (s >> i) & 1;
}
template <class T>
T onbit(T s, int i) {
  return s | (T(1) << i);
}
template <class T>
T offbit(T s, int i) {
  return s & (~(T(1) << i));
}
template <class T>
int cntbit(T s) {
  return __builtin_popcnt(s);
}
template <class T>
T gcd(T a, T b) {
  T r;
  while (b != 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
map<pair<int, int>, int> M, M1;
int dem[400005 * 5];
vector<int> V[400005];
vector<int> V1[400005];
int n, m, deg[400005];
int cur = 0;
int res[400005], que[400005], size, flag[400005];
int q[400005], qs, par[400005];
bool ok = true;
void dfs(int u, int pu, int ppu, int c) {
  for (int i = 0; i < (((long long)(V[u]).size())); ++i) {
    int v = V[u][i];
    if (res[v]) continue;
    if (!M[make_pair(pu, v)]) {
      res[v] = res[u] + c;
      dfs(v, u, pu, c);
    } else if (!M[make_pair(ppu, v)]) {
      res[v] = res[u];
    } else {
      res[v] = res[u] - c;
    }
  }
}
void go(int id) {
  for (int t = 0; t < (size); ++t) {
    int u = que[t];
    flag[u] = 0;
  }
  qs = 0;
  q[qs++] = id;
  flag[id] = 1;
  for (int i = 0; i < (qs); ++i) {
    int u = q[i];
    if (u != id && !M[make_pair(id, u)]) {
      int v = par[u];
      res[id] = cur;
      res[v] = cur + 1;
      res[u] = cur + 2;
      dfs(id, v, u, -1);
      dfs(u, v, id, 1);
      break;
    }
    for (int j = 0; j < (((long long)(V[u]).size())); ++j) {
      int v = V[u][j];
      if (!flag[v]) {
        flag[v] = 1;
        q[qs++] = v;
        par[v] = u;
      }
    }
  }
  for (int t = 0; t < (size); ++t) {
    int u = que[t];
    if (!res[u]) {
      ok = false;
    }
    dem[res[u]]++;
  }
  for (int t = 0; t < (size); ++t) {
    int u = que[t];
    if (dem[res[u]] + dem[res[u] - 1] + dem[res[u] + 1] !=
        ((long long)(V[u]).size()) + 1) {
      ok = false;
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  memset(deg, 0, sizeof(deg));
  for (int run = 0; run < (m); ++run) {
    int u, v;
    cin >> u >> v;
    V[u].push_back(v);
    V[v].push_back(u);
    M[make_pair(u, v)] = 1;
    M[make_pair(v, u)] = 1;
    deg[u]++;
    deg[v]++;
  }
  memset(res, 0, sizeof(res));
  memset(flag, 0, sizeof(flag));
  memset(dem, 0, sizeof(dem));
  for (int i = (1); i <= (n); ++i)
    if (!res[i]) {
      size = 0;
      que[size++] = i;
      flag[i] = 1;
      for (int t = 0; t < (size); ++t) {
        int u = que[t];
        for (int i = 0; i < (((long long)(V[u]).size())); ++i) {
          int v = V[u][i];
          if (!flag[v]) {
            flag[v] = 1;
            que[size++] = v;
          }
        }
      }
      cur += size + 1;
      bool have = false;
      for (int t = 0; t < (size); ++t) {
        int u = que[t];
        if (deg[u] != size - 1) {
          have = true;
          go(u);
          break;
        }
      }
      if (!have) {
        for (int t = 0; t < (size); ++t) {
          int u = que[t];
          res[u] = cur;
        }
      }
    }
  if (ok) {
    cout << "YES" << endl;
    for (int i = (1); i <= (n); ++i) cout << res[i] << " ";
  } else
    cout << "NO" << endl;
  return 0;
}
