#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9 + 123;
const long long infl = (long long)1e18 + 123;
const double eps = 1e-9;
const int MAX_N = (int)3e5 + 5;
const int mod = (int)1e9 + 7;
int n, m;
vector<int> g[MAX_N], contains[MAX_N];
set<int> first[MAX_N];
int p[MAX_N], cl[MAX_N];
bool cmp(int x, int y) { return g[x] < g[y]; }
bool used[MAX_N];
int val[MAX_N], ptr, ans[MAX_N];
void dfs(int v, int pr = -1) {
  used[v] = 1;
  val[v] = ++ptr;
  for (auto to : first[v]) {
    if (to == pr) continue;
    if (used[to]) {
      puts("NO");
      exit(0);
    }
    dfs(to, v);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1, u, v; i <= m; i++) {
    scanf("%d%d", &u, &v);
    g[u].push_back(v), g[v].push_back(u);
  }
  for (int i = 1; i <= n; i++) {
    g[i].push_back(i);
    sort(g[i].begin(), g[i].end());
  }
  for (int i = 1; i <= n; i++) p[i] = i;
  sort(p + 1, p + n + 1, &cmp);
  int sz = 0;
  for (int i = 1; i <= n; i++) {
    if (i == 1 || g[p[i]] != g[p[i - 1]]) sz++;
    cl[p[i]] = sz;
    contains[sz].push_back(p[i]);
  }
  for (int i = 1; i <= n; i++)
    for (auto to : g[i]) {
      if (cl[i] != cl[to]) first[cl[i]].insert(cl[to]);
    }
  for (int i = 1; i <= n; i++)
    if ((int)((first[i]).size()) > 2) {
      puts("NO");
      return 0;
    }
  int v = 1;
  while (v <= sz && (int)((first[v]).size()) == 2) v++;
  if (v > sz) {
    puts("NO");
    return 0;
  }
  dfs(v);
  puts("YES");
  for (int i = 1; i <= sz; i++)
    for (auto to : contains[i]) ans[to] = val[i];
  for (int i = 1; i <= n; i++) assert(ans[i] > 0);
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  return 0;
}
