#include <bits/stdc++.h>
using namespace std;
vector<int> G[3 * 100000 + 5], ng[300000 + 5];
map<pair<int, int>, vector<int>> groups;
int gn[300000 + 5];
int color[300000 + 5];
int vis[300000 + 5];
int done[300000 + 5];
int main() {
  int N, M, a, b;
  cin >> N >> M;
  for (int i = (1); i <= (M); ++i) {
    scanf("%d", &a);
    scanf("%d", &b);
    G[a].push_back(b);
    G[b].push_back(a);
  }
  vector<pair<vector<int>, int>> V;
  for (int i = (1); i <= (N); ++i)
    G[i].push_back(i), sort(G[i].begin(), G[i].end()), V.push_back({G[i], i});
  sort(V.begin(), V.end());
  int p = 0;
  for (int i = 0; i < V.size(); ++i) {
    if (i == 0 or V[i].first != V[i - 1].first) {
      ++p;
    }
    gn[V[i].second] = p;
  }
  for (int i = 1; i <= N; ++i) {
    if (done[gn[i]]) continue;
    done[gn[i]] = 1;
    for (int u : G[i]) {
      if (vis[gn[u]] != i and gn[i] != gn[u] and u != i) {
        vis[gn[u]] = i;
        ng[gn[i]].push_back(gn[u]);
      }
    }
  }
  int possible = 1;
  int start = -1;
  for (int i = 1; i <= N; ++i) {
    if (ng[i].size() == 1) start = i;
    if (ng[i].size() > 2) possible = 0;
  }
  if (p == 1) start = 1;
  if (possible == 0 or start == -1) {
    cout << "NO";
    return 0;
  }
  int c = 0, cur = start;
  int last = -1;
  do {
    color[cur] = ++c;
    int next;
    if (ng[cur].size() == 0) break;
    if (ng[cur][0] == last)
      next = ng[cur][1];
    else
      next = ng[cur][0];
    last = cur;
    cur = next;
  } while (ng[cur].size() != 1);
  color[cur] = ++c;
  cout << "YES\n";
  for (int i = 1; i <= N; ++i) {
    printf("%d ", color[gn[i]]);
  }
}
