#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 15;
vector<pair<vector<int>, int>> v;
vector<int> adj[N], adj2[N];
set<pair<int, int>> s;
int final_pos = 1, n, m, x, y, pos = 1, root, ind[N], ans[N], is;
void dfs(int x, int p) {
  ans[x] = final_pos++;
  for (int i = 0; i < adj2[x].size(); ++i)
    if (adj2[x][i] != p) dfs(adj2[x][i], x);
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    cin >> x >> y;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  for (int i = 1; i <= n; ++i) {
    adj[i].push_back(i);
    sort(adj[i].begin(), adj[i].end());
    v.push_back(make_pair(adj[i], i));
  }
  sort(v.begin(), v.end());
  ind[v[0].second] = pos++;
  for (int i = 1; i < n; ++i) {
    if (v[i - 1].first == v[i].first)
      ind[v[i].second] = pos - 1;
    else
      ind[v[i].second] = pos++;
  }
  --pos;
  for (int i = 0; i < n; ++i) {
    if (i != 0 && ind[v[i - 1].second] == ind[v[i].second])
      continue;
    else {
      y = ind[v[i].second];
      for (int j = 0; j < v[i].first.size(); ++j) {
        x = ind[v[i].first[j]];
        if (x != y) {
          if (!s.count(make_pair(y, x))) {
            s.insert(make_pair(y, x));
            adj2[y].push_back(x);
          }
        }
      }
      if (adj2[y].size() > 2) is = 1;
      if (adj2[y].size() == 1) root = y;
    }
  }
  if (is) return cout << "NO", 0;
  cout << "YES" << endl;
  if (pos == 1) {
    for (int i = 1; i <= n; ++i) cout << 1 << " ";
    return 0;
  }
  dfs(root, 0);
  for (int i = 1; i <= n; ++i) cout << ans[ind[i]] << " ";
}
