#include <bits/stdc++.h>
using namespace std;
template <class T, class S>
ostream& operator<<(ostream& os, const pair<T, S>& v) {
  return os << "(" << v.first << ", " << v.second << ")";
}
template <class T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  os << "[";
  for (int i = int(0); i <= int((static_cast<int>((v).size())) - 1); ++i) {
    if (i) os << ", ";
    os << v[i];
  }
  return os << "]";
}
template <class T>
bool setmax(T& _a, T _b) {
  if (_a < _b) {
    _a = _b;
    return true;
  }
  return false;
}
template <class T>
bool setmin(T& _a, T _b) {
  if (_b < _a) {
    _a = _b;
    return true;
  }
  return false;
}
template <class T>
T gcd(T _a, T _b) {
  return _b == 0 ? _a : gcd(_b, _a % _b);
}
vector<int> read_vi(int n = -1) {
  if (n < 0) scanf("%d", &n);
  vector<int> a(n);
  for (int i = int(0); i <= int((n)-1); ++i) scanf("%d", &a[i]);
  return a;
}
vector<long long> read_vl(int n = -1) {
  if (n < 0) scanf("%d", &n);
  vector<long long> a(n);
  for (int i = int(0); i <= int((n)-1); ++i) scanf("%lld", &a[i]);
  return a;
}
vector<double> read_vd(int n = -1) {
  if (n < 0) scanf("%d", &n);
  vector<double> a(n);
  for (int i = int(0); i <= int((n)-1); ++i) scanf("%lf", &a[i]);
  return a;
}
vector<pair<int, int> > read_vpi(int n = -1) {
  if (n < 0) scanf("%d", &n);
  vector<pair<int, int> > a(n);
  for (int i = int(0); i <= int((n)-1); ++i)
    scanf("%d%d", &a[i].first, &a[i].second);
  return a;
}
vector<pair<long long, long long> > read_vpl(int n = -1) {
  if (n < 0) scanf("%d", &n);
  vector<pair<long long, long long> > a(n);
  for (int i = int(0); i <= int((n)-1); ++i)
    scanf("%lld%lld", &a[i].first, &a[i].second);
  return a;
}
vector<pair<double, double> > read_vpd(int n = -1) {
  if (n < 0) scanf("%d", &n);
  vector<pair<double, double> > a(n);
  for (int i = int(0); i <= int((n)-1); ++i)
    scanf("%lf%lf", &a[i].first, &a[i].second);
  return a;
}
inline long long powmod(long long a, long long b, long long m) {
  long long r = 1;
  for (; b > 0; b >>= 1, a = a * a % m) {
    if (b & 1) r = r * a % m;
  }
  return r;
}
pair<vector<int>, vector<int> > bfs(const vector<vector<int> >& es, int start) {
  const int n = static_cast<int>((es).size());
  vector<int> dis(n, -1), pre(n, -1);
  queue<int> que;
  dis[start] = 0;
  que.push(start);
  while (!que.empty()) {
    int x = que.front();
    que.pop();
    for (int y : es[x]) {
      if (dis[y] < 0) {
        dis[y] = dis[x] + 1;
        pre[y] = x;
        que.push(y);
      }
    }
  }
  return {dis, pre};
}
bool check(const vector<vector<int> >& es, vector<int> ans) {
  const int n = static_cast<int>((es).size());
  vector<int> cnt(n * 2 + 5, 0);
  for (int c : ans) cnt[c]++;
  for (int x = int(0); x <= int((n)-1); ++x) {
    if (static_cast<int>((es[x]).size()) !=
        cnt[ans[x] - 1] + cnt[ans[x]] + cnt[ans[x] + 1] - 1) {
      return false;
    }
    for (int y : es[x]) {
      if (abs(ans[x] - ans[y]) > 1) {
        return false;
      }
    }
  }
  return true;
}
vector<int> solve(vector<vector<int> > es) {
  const int n = static_cast<int>((es).size());
  int a = -1, b = -1;
  for (int x = int(0); x <= int((n)-1); ++x) {
    sort((es[x]).begin(), (es[x]).end());
    es[x].erase(unique((es[x]).begin(), (es[x]).end()), es[x].end());
    if (static_cast<int>((es[x]).size()) < n - 1) {
      a = x;
      b = 0;
      for (int y : es[x]) {
        if (y == b) {
          ++b;
        } else {
          break;
        }
      }
    }
  }
  if (a < 0) {
    return vector<int>(n, 1);
  }
  const auto has = [&](int x, int y) {
    auto it = lower_bound((es[x]).begin(), (es[x]).end(), y);
    return it != es[x].end() && *it == y;
  };
  int c = -1;
  {
    vector<int> dis, pre;
    tie(dis, pre) = bfs(es, a);
    vector<int> path;
    for (int x = b; x >= 0; x = pre[x]) path.push_back(x);
    assert(static_cast<int>((path).size()) >= 3);
    a = path[0], b = path[1], c = path[2];
  }
  vector<int> da = bfs(es, a).first, db = bfs(es, b).first,
              dc = bfs(es, c).first;
  vector<int> ans(n, -1);
  ans[a] = n - 1, ans[b] = n, ans[c] = n + 1;
  for (int x : es[b]) {
    if (x != a && x != c) {
      bool ba = has(a, x), bc = has(c, x);
      if (ba && bc) {
        ans[x] = n;
      } else if (ba) {
        ans[x] = n - 1;
      } else {
        ans[x] = n + 1;
      }
    }
  }
  for (int x = int(0); x <= int((n)-1); ++x)
    if (ans[x] < 0) {
      if (da[x] < dc[x]) {
        ans[x] = n - db[x];
      } else {
        ans[x] = n + db[x];
      }
    }
  if (check(es, ans)) {
    return ans;
  } else {
    return vector<int>();
  }
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  vector<vector<int> > es(n);
  for (int i = int(0); i <= int((m)-1); ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    --a, --b;
    es[a].push_back(b), es[b].push_back(a);
  }
  vector<int> xs = solve(es);
  if (xs.empty()) {
    printf("NO\n");
  } else {
    printf("YES\n");
    for (int x : xs) printf("%d ", x);
    printf("\n");
  }
  return 0;
}
