#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 5;
int cnt;
int ans[maxn];
int ansGroup[maxn];
vector<int> order;
int belong[maxn];
vector<int> gInit[maxn], G[maxn];
void dfs(int cur, int pa) {
  ansGroup[cur] = cnt++;
  for (auto o : G[cur])
    if (pa != o) {
      dfs(o, cur);
    }
}
int main() {
  int vs, es;
  scanf("%d%d", &vs, &es);
  for (int i = 0; i < es; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    gInit[x].push_back(y);
    gInit[y].push_back(x);
  }
  map<vector<int>, int> rec;
  int group = 1;
  for (int i = 1; i <= vs; i++) {
    gInit[i].push_back(i);
    sort(gInit[i].begin(), gInit[i].end());
    if (rec[gInit[i]] == 0) {
      belong[i] = rec[gInit[i]] = group;
      group++;
    } else
      belong[i] = rec[gInit[i]];
  }
  for (int i = 1; i <= vs; i++) {
    for (auto to : gInit[i]) {
      int x = belong[to], y = belong[i];
      if (x != y) {
        G[x].push_back(y);
        G[y].push_back(x);
      }
    }
  }
  for (int i = 1; i < group; i++) {
    sort(G[i].begin(), G[i].end());
    G[i].erase(unique(G[i].begin(), G[i].end()), G[i].end());
  }
  int ok = 1;
  for (int i = 1; i < group; i++) {
    if (G[i].size() > 2) ok = 0;
  }
  if (ok == 0) {
    puts("NO");
    return 0;
  }
  puts("YES");
  int rtgroup = 1;
  for (int i = 1; i < group; i++) {
    if (G[i].size() == 1) {
      rtgroup = i;
      break;
    }
  }
  cnt = 1;
  dfs(rtgroup, -1);
  for (int i = 1; i <= vs; i++) {
    ans[i] = ansGroup[belong[i]];
  }
  for (int i = 1; i <= vs; i++) {
    printf("%d%c", ans[i], i == vs ? '\n' : ' ');
  }
  return 0;
}
