#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 5;
vector<int> g[maxn];
int f[maxn], d[maxn], w[maxn], tot, ct;
set<int> g2[maxn];
bool cmp(const int &a, const int &b) { return g[a] < g[b]; }
void dfs(int u, int fa) {
  if (w[u]) return;
  w[u] = ++ct;
  tot++;
  for (auto v : g2[u]) {
    if (v == fa) continue;
    dfs(v, u);
  }
}
int main() {
  int n, m, i, u, v;
  scanf("%d%d", &n, &m);
  for (i = 0; i < m; i++) {
    scanf("%d%d", &u, &v);
    g[u].push_back(v);
    g[v].push_back(u);
  }
  for (i = 1; i <= n; i++) {
    g[i].push_back(i);
    sort(g[i].begin(), g[i].end());
    f[i] = i;
  }
  sort(f + 1, f + n + 1, cmp);
  m = 1;
  d[f[1]] = 1;
  for (i = 2; i <= n; i++) {
    if (g[f[i]] == g[f[i - 1]])
      d[f[i]] = d[f[i - 1]];
    else
      d[f[i]] = ++m;
  }
  for (i = 1; i <= n; i++) {
    for (auto r : g[i]) {
      if (d[r] != d[i]) g2[d[i]].insert(d[r]);
    }
  }
  for (i = 1; i <= m; i++) {
    if (g2[i].size() > 2) {
      printf("NO\n");
      return 0;
    }
  }
  for (i = 1; i <= m; i++) {
    ct += 2;
    if (g2[i].size() < 2) dfs(i, 0);
  }
  if (tot < m) {
    printf("NO\n");
    return 0;
  }
  printf("YES\n");
  for (i = 1; i <= n; i++) printf("%d%c", w[d[i]], " \n"[i == n]);
  return 0;
}
