#include <bits/stdc++.h>
using namespace std;
template <class T>
bool uax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool uin(T& a, const T& b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
const int N = 300500;
const int inf = 1e9 + 100500;
int n;
vector<int> g[N];
bool get(int i, int j) {
  if (g[i].size() > g[j].size()) swap(i, j);
  return binary_search((g[i]).begin(), (g[i]).end(), j);
}
bool dfs(int v, int p, vector<int>& ans, int dval) {
  while (true) {
    ans[v] = ans[p] + dval;
    int u = -1;
    for (int i : g[v])
      if (i != p) {
        if (!get(p, i)) {
          u = i;
          break;
        }
      }
    if (u != -1) {
      if (ans[u] != inf) return false;
      p = v;
      v = u;
    } else
      break;
  }
  return true;
}
vector<int> solve() {
  int m;
  n = 300000;
  m = 300000 - 1;
  cin >> n >> m;
  vector<int> ans(n, 0);
  for (int i = 0; i < (int)(m); ++i) {
    int v, u;
    v = i + 1;
    u = i + 2;
    cin >> v >> u;
    --v;
    --u;
    g[v].push_back(u);
    g[u].push_back(v);
  }
  for (int i = 0; i < (int)(n); ++i) {
    sort((g[i]).begin(), (g[i]).end());
  }
  if (m == (n - 1) * n / 2) {
    return ans;
  }
  int v0 = -1;
  pair<int, int> z(-1, -1);
  for (int i = 0; i < (int)(n); ++i) {
    for (int p = 0; p < (int)(g[i].size()); ++p) {
      for (int q = 0; q < (int)(p); ++q) {
        int v = g[i][p], u = g[i][q];
        if (!get(v, u)) {
          z = pair<int, int>(v, u);
          break;
        }
      }
      if (z.first != -1) break;
    }
    if (z.first != -1) {
      v0 = i;
      break;
    }
  }
  assert(v0 != -1);
  for (int i = 0; i < (int)(n); ++i) ans[i] = inf;
  ans[v0] = 0;
  if (!dfs(z.first, v0, ans, +1)) return {};
  if (!dfs(z.second, v0, ans, -1)) return {};
  int L = inf / 2, R = -inf / 2;
  for (int x : ans)
    if (x != inf) {
      uin(L, x);
      uax(R, x);
    }
  assert(R - L >= 2);
  bool fail = false;
  for (int i = 0; i < (int)(n); ++i)
    if (ans[i] == inf) {
      int l = inf / 2, r = -inf / 2;
      for (int u : g[i])
        if (ans[u] != inf) {
          uin(l, ans[u]);
          uax(r, ans[u]);
        }
      if (r - l == 2) {
        ans[i] = (l + r) / 2;
      } else if (r - l == 1 && l == L) {
        ans[i] = l;
      } else if (r - l == 1 && r == R) {
        ans[i] = r;
      } else {
        fail = true;
        break;
      }
    }
  if (fail) return {};
  for (int i = 0; i < (int)(n); ++i)
    for (int j : g[i])
      if (abs(ans[i] - ans[j]) > 1) return {};
  vector<vector<int> > rans(R - L + 1);
  for (int i = 0; i < (int)(n); ++i) rans[ans[i] - L].push_back(i);
  for (int x = 0; x < (int)(rans.size()); ++x)
    for (int di = (int)(-1); di <= (int)(1); ++di) {
      int y = x + di;
      if (y >= 0 && y < rans.size()) {
        for (int i : rans[x]) {
          for (int j : rans[y])
            if (j != i) {
              if (!get(i, j)) return {};
            }
        }
      }
    }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout << fixed;
  cout.precision(15);
  cerr << fixed;
  cerr.precision(15);
  vector<int> ans = solve();
  if (ans.empty())
    cout << "NO\n";
  else {
    cout << "YES\n";
    int ch = 1 - *min_element((ans).begin(), (ans).end());
    for (int i = 0; i < (int)(n); ++i) cout << ans[i] + ch << " \n"[i + 1 == n];
  }
  return 0;
}
