#include <bits/stdc++.h>
using namespace std;
const int MAXN = 300100;
pair<set<int>, int> edges[MAXN];
int comp[MAXN];
set<int> cedges[MAXN];
bool bio[MAXN];
vector<int> inc[MAXN];
int sol[MAXN];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  int u, v;
  int ccnt;
  int i;
  cin >> n >> m;
  while (m--) {
    cin >> u >> v;
    --u, --v;
    edges[u].first.insert(v);
    edges[v].first.insert(u);
  }
  for (u = 0; u < n; ++u) {
    edges[u].first.insert(u);
    edges[u].second = u;
  }
  sort(edges, edges + n);
  ccnt = 0;
  for (u = 0; u < n;) {
    for (v = u; v < n && edges[v].first == edges[u].first; ++v) {
      comp[edges[v].second] = ccnt;
      inc[ccnt].push_back(edges[v].second);
    }
    ++ccnt;
    u = v;
  }
  if (ccnt == 1) {
    cout << "YES\n";
    for (i = 0; i < n; ++i) cout << 1 << ' ';
    cout << '\n';
    return 0;
  }
  for (u = 0; u < n; ++u)
    for (int v : edges[u].first)
      if (comp[v] != comp[edges[u].second])
        cedges[comp[edges[u].second]].insert(comp[v]);
  int start = -1;
  for (u = 0; u < ccnt; ++u) {
    if (cedges[u].size() > 2) {
      cout << "NO\n";
      return 0;
    }
    if (cedges[u].size() == 1) {
      start = u;
    }
  }
  if (start == -1) {
    cout << "NO\n";
    return 0;
  }
  for (i = 1;; ++i) {
    bio[start] = true;
    for (int u : inc[start]) sol[u] = i;
    for (int nxt : cedges[start])
      if (!bio[nxt]) {
        start = nxt;
        goto cont;
      }
    break;
  cont:;
  }
  cout << "YES\n";
  for (u = 0; u < n; ++u) cout << sol[u] << ' ';
  cout << '\n';
}
