#include <bits/stdc++.h>
using namespace std;
int cliqOf[300100][2], nCliqsOf[300100], nCliqs;
vector<int> G[300100], cliqG[300100];
int cliqColor[300100], nodeColor[300100], curColor = 1;
int seen[300100], seenId;
bool expand(int a, int b) {
  for (int i = 0; i < nCliqsOf[a]; ++i)
    for (int j = 0; j < nCliqsOf[b]; ++j)
      if (cliqOf[a][i] == cliqOf[b][j]) return true;
  seen[a] = seen[b] = ++seenId;
  vector<int> q;
  q.push_back(a);
  q.push_back(b);
  for (int top = 0; top < q.size(); ++top) {
    int i = q[top];
    for (int j : G[i]) {
      if (seen[j] == seenId) continue;
      if (G[j].size() < q.size()) continue;
      int cnt = 0;
      for (int k : G[j])
        if (seen[k] == seenId) cnt++;
      if (cnt == q.size()) {
        seen[j] = seenId;
        q.push_back(j);
      }
    }
  }
  for (int k : q) {
    if (nCliqsOf[k] == 2) return false;
    cliqOf[k][nCliqsOf[k]++] = nCliqs;
  }
  nCliqs++;
  return true;
}
int main() {
  int n, nEdges, fr, to;
  scanf("%d%d", &n, &nEdges);
  while (nEdges--) {
    scanf("%d%d", &fr, &to);
    fr--;
    to--;
    G[fr].push_back(to);
    G[to].push_back(fr);
  }
  for (int i = 0; i < n; ++i)
    for (int j : G[i])
      if (!expand(i, j)) {
        printf("NO\n");
        return 0;
      }
  set<pair<int, int> > st;
  for (int i = 0; i < n; ++i)
    if (nCliqsOf[i] == 2) {
      int a = cliqOf[i][0];
      int b = cliqOf[i][1];
      if (a > b) swap(a, b);
      if (st.count({a, b})) continue;
      st.insert({a, b});
      cliqG[a].push_back(b);
      cliqG[b].push_back(a);
    }
  int cliq = 0, prevCliq = -1;
  while (cliq < nCliqs && cliqG[cliq].size() != 1) cliq++;
  if (cliq == nCliqs) cliq = 0;
  while (true) {
    cliqColor[cliq] = curColor;
    curColor += 2;
    bool foundNext = false;
    for (int nextCliq : cliqG[cliq])
      if (nextCliq != prevCliq) {
        prevCliq = cliq;
        cliq = nextCliq;
        foundNext = true;
        break;
      }
    if (!foundNext) break;
  }
  vector<int> aux(n);
  for (int i = 0; i < n; ++i) {
    if (nCliqsOf[i] == 0)
      nodeColor[i] = curColor, curColor += 2;
    else if (nCliqsOf[i] == 1)
      nodeColor[i] = cliqColor[cliqOf[i][0]];
    else
      nodeColor[i] = (cliqColor[cliqOf[i][0]] + cliqColor[cliqOf[i][1]]) / 2;
    if (!nodeColor[i]) {
      printf("NO\n");
      return 0;
    }
    aux[i] = nodeColor[i];
  }
  sort(aux.begin(), aux.end());
  aux.resize(unique(aux.begin(), aux.end()) - aux.begin());
  for (int i = 0; i < n; ++i)
    nodeColor[i] =
        lower_bound(aux.begin(), aux.end(), nodeColor[i]) - aux.begin() + 1;
  printf("YES\n");
  for (int i = 0; i < n; ++i) printf("%d%c", nodeColor[i], " \n"[i + 1 == n]);
  return 0;
}
