#include <bits/stdc++.h>
using namespace std;
int t = 1;
void solve() {
  int n, x, y, m;
  cin >> n >> m;
  map<int, set<int> > new_graph;
  vector<set<int> > v(n + 1);
  map<set<int>, set<int> > mapa;
  vector<int> num(n + 1);
  map<int, int> ans, vis;
  for (int i = 0; i < m; i += 1) {
    cin >> x >> y;
    v[x].insert(y);
    v[y].insert(x);
  }
  for (int i = 1; i < n + 1; i += 1) v[i].insert(i);
  for (int i = 1; i < n + 1; i += 1) mapa[v[i]].insert(i);
  x = 1;
  for (auto const& it : mapa) {
    for (auto const& it1 : it.second) {
      num[it1] = x;
    }
    x++;
  }
  for (int i = 1; i < n + 1; i += 1) {
    for (auto const& it : v[i])
      if (num[it] != num[i]) {
        new_graph[num[it]].insert(num[i]);
        new_graph[num[i]].insert(num[it]);
      }
  }
  y = 0;
  int ver = 0;
  for (auto it : new_graph) {
    if (int(it.second.size()) > 2) {
      cout << "NO";
      return;
    }
    y += int(it.second.size());
    if (int(it.second.size()) == 1) x = it.first;
    ver++;
  }
  if (y / 2 >= ver && ver > 1) {
    cout << "NO";
    return;
  }
  y = 1;
  ans[x] = y;
  while (vis[x] == 0) {
    vis[x] = 1;
    ans[x] = y;
    y++;
    for (auto const& it : new_graph[x])
      if (vis[it] == 0) x = it;
  }
  cout << "YES\n";
  for (int i = 1; i < n + 1; i += 1) cout << ans[num[i]] + 1 << " ";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  while (t--) solve();
  return 0;
}
