#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline T qmin(const T &x, const T &y) {
  return x < y ? x : y;
}
template <typename T>
inline T qmax(const T &x, const T &y) {
  return x > y ? x : y;
}
template <typename T>
inline void getmin(T &x, const T &y) {
  if (y < x) x = y;
}
template <typename T>
inline void getmax(T &x, const T &y) {
  if (y > x) x = y;
}
inline void fileio(string s) {
  freopen((s + ".in").c_str(), "r", stdin);
  freopen((s + ".out").c_str(), "w", stdout);
}
const int inf = (int)1e9 + 7;
const long long linf = (long long)1e17 + 7;
const int N = 3e5 + 7, M = N << 1;
const unsigned long long base = 1e8 + 7;
vector<int> g[N];
map<unsigned long long, int> used;
int x[N], y[N];
int n, m, par[N], deg[N];
int ans[N], cnt;
inline void dfs(int u, int p) {
  ans[u] = ++cnt;
  for (int i = 0; i < (g[u].size()); ++i) {
    int v = g[u][i];
    if (v == p) continue;
    dfs(v, u);
    break;
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = (1); i <= (m); ++i) {
    scanf("%d%d", x + i, y + i);
    g[x[i]].push_back(y[i]);
    g[y[i]].push_back(x[i]);
  }
  for (int i = (1); i <= (n); ++i) {
    g[i].push_back(i);
    sort(g[i].begin(), g[i].end());
    unsigned long long hs = 0;
    for (int j = 0; j < (g[i].size()); ++j) hs = hs * base + g[i][j];
    if (used[hs])
      par[i] = used[hs];
    else
      used[hs] = i, par[i] = i;
    g[i].clear();
  }
  for (int i = (1); i <= (m); ++i) {
    int u = par[x[i]], v = par[y[i]];
    if (u == v) continue;
    g[u].push_back(v), g[v].push_back(u);
  }
  int st = 0;
  for (int i = (1); i <= (n); ++i)
    if (par[i] == i) {
      sort(g[i].begin(), g[i].end());
      g[i].resize(unique(g[i].begin(), g[i].end()) - g[i].begin());
      if (g[i].size() > 2) return puts("NO"), 0;
      if (g[i].size() < 2) st = i;
    }
  if (!st) return puts("NO"), 0;
  dfs(st, 0);
  puts("YES");
  for (int i = (1); i <= (n); ++i) printf("%d ", ans[par[i]]);
  return puts(""), 0;
}
