#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const int MAX = 300001;
int n, m;
pair<vector<int>, int> g[MAX];
int group[MAX];
set<int> G[MAX];
int res[MAX];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    u--;
    v--;
    g[u].first.push_back(v);
    g[v].first.push_back(u);
  }
  for (int i = 0; i < n; i++) {
    g[i].first.push_back(i);
    g[i].second = i;
    sort((g[i].first).begin(), (g[i].first).end());
  }
  sort(g, g + n);
  int c = 1;
  for (int i = 1; i < n; i++) {
    if (g[i].first == g[i - 1].first)
      group[g[i].second] = group[g[i - 1].second];
    else
      group[g[i].second] = c++;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < (int)g[i].first.size(); j++) {
      int u = group[g[i].second];
      int v = group[g[i].first[j]];
      if (u != v) {
        G[u].insert(v);
        G[v].insert(u);
      }
    }
  }
  if (c == 1) {
    res[0] = 1;
  } else {
    vector<int> root;
    for (int i = 0; i < c; i++) {
      if (G[i].size() > 2) {
        cout << "NO" << endl;
        return 0;
      }
      if (G[i].size() == 1) root.push_back(i);
    }
    if (root.size() == 0) {
      cout << "NO" << endl;
      return 0;
    }
    int val = 1;
    int par = -1;
    int cur = root[0];
    while (true) {
      res[cur] = val++;
      if (cur == root.back()) break;
      for (auto node : G[cur]) {
        if (node != par) {
          par = cur;
          cur = node;
          break;
        }
      }
    }
  }
  cout << "YES" << endl;
  for (int i = 0; i < n; i++) cout << res[group[i]] << " ";
  return 0;
}
