#include <bits/stdc++.h>
using namespace std;
set<int> adj[300010], ng[300010];
int bel[300010], n, m, s[300010], e[300010], col[300010];
map<set<int>, int> st;
vector<int> v[300010];
int tcnt = 0, colcnt = 0;
void dfs(int np, int last) {
  col[np] = ++colcnt;
  for (int i = 0; i < v[np].size(); i++) {
    if (v[np][i] == last) continue;
    dfs(v[np][i], np);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) adj[i].insert(i);
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &s[i], &e[i]);
    adj[s[i]].insert(e[i]);
    adj[e[i]].insert(s[i]);
  }
  for (int i = 1; i <= n; i++) {
    if (st.find(adj[i]) == st.end()) st[adj[i]] = ++tcnt;
    bel[i] = st[adj[i]];
  }
  for (int i = 1, ti, tj; i <= m; i++) {
    ti = bel[s[i]];
    tj = bel[e[i]];
    if (ti == tj) continue;
    if (ng[ti].find(tj) == ng[ti].end()) {
      v[ti].push_back(tj);
      v[tj].push_back(ti);
      ng[ti].insert(tj);
      ng[tj].insert(ti);
    }
  }
  int stpos = 0;
  for (int i = 1; i <= tcnt; i++) {
    if (v[i].size() >= 3) {
      puts("NO");
      return 0;
    }
    if (v[i].size() <= 1) stpos = i;
  }
  if (!stpos) {
    puts("NO");
    return 0;
  }
  dfs(stpos, 0);
  puts("YES");
  for (int i = 1; i <= n; i++) printf("%d ", col[bel[i]]);
  return 0;
}
