#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int n, m, id;
vector<vector<int> > g;
map<vector<int>, int> mp;
map<int, int> mp1;
vector<vector<int> > g1;
bool vis[N];
void dfs(int u) {
  for (int i = 0; i < g[u].size(); i++) {
    int v = g[u][i];
    if (vis[v]) continue;
    vis[v] = true;
    if (mp[g[u]] == mp[g[v]]) continue;
    g1[mp[g[u]]].push_back(mp[g[v]]);
    g1[mp[g[v]]].push_back(mp[g[u]]);
    dfs(v);
  }
}
void print() {
  puts("YES");
  for (int i = 1; i <= n; i++) {
    cout << mp1[mp[g[i]]] << " ";
  }
  cout << endl;
}
void solve() {
  int deg1 = 0, deg2 = 0, id1;
  for (int i = 1; i < id; i++) {
    if (g1[i].size() == 1) {
      deg1++;
      id1 = i;
    } else if (g1[i].size() == 2)
      deg2++;
    else {
      puts("NO");
      return;
    }
  }
  if (deg1 > 2) {
    puts("NO");
    return;
  }
  int x = 1, last = 0;
  mp1[id1] = x++;
  while (true) {
    int v = g1[id1][0];
    if (v == last) v = g1[id1][1];
    last = id1;
    id1 = v;
    mp1[id1] = x++;
    if (g1[id1].size() == 1) break;
  }
  print();
}
int main() {
  while (cin >> n >> m) {
    g.clear();
    g.resize(n + 1);
    g1.clear();
    g1.resize(n + 1);
    mp.clear();
    mp1.clear();
    memset(vis, false, sizeof(vis));
    int u, v;
    for (int i = 0; i < m; i++) {
      scanf("%d%d", &u, &v);
      g[u].push_back(v);
      g[v].push_back(u);
    }
    id = 1;
    for (int i = 1; i <= n; i++) {
      g[i].push_back(i);
      sort(g[i].begin(), g[i].end());
      if (mp[g[i]] == 0) mp[g[i]] = id++;
    }
    vis[1] = true;
    dfs(1);
    for (int i = 1; i < id; i++) {
      sort(g1[i].begin(), g1[i].end());
      vector<int>::iterator it = unique(g1[i].begin(), g1[i].end());
      g1[i].erase(it, g1[i].end());
    }
    if (id == 2) {
      mp1[1] = 1;
      print();
      continue;
    }
    solve();
  }
  return 0;
}
