#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:167772160000")
using namespace std;
template <typename T>
using min_heap = std::priority_queue<T, std::vector<T>, std::greater<T> >;
template <typename T>
using max_heap = std::priority_queue<T, std::vector<T>, std::less<T> >;
vector<int> edges[310000];
long long rNum[310000];
long long setHash[310000];
long long getRand() {
  long long a, b, c, d;
  a = rand();
  b = rand();
  c = rand();
  d = rand();
  b <<= 15;
  c <<= 30;
  d <<= 45;
  return a ^ b ^ c ^ d;
}
int par[310000];
int find(int a) {
  if (a == par[a]) return a;
  par[a] = find(par[a]);
  return par[a];
}
void unite(int a, int b) {
  a = find(a);
  b = find(b);
  par[a] = b;
}
vector<int> newEdges[310000];
int numbers[310000];
bool vis[310000];
int totalNum;
void number(int a) {
  if (vis[a]) return;
  vis[a] = true;
  numbers[a] = ++totalNum;
  for (int i = 0; i < (newEdges[a].size()); i++) number(newEdges[a][i]);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int m;
  cin >> m;
  srand(3543216);
  for (int i = 1; i <= (n); i++) setHash[i] = rNum[i] = getRand();
  for (int i = 1; i <= (n); i++) par[i] = i;
  for (int i = 0; i < (m); i++) {
    int a, b;
    cin >> a >> b;
    edges[a].push_back(b);
    edges[b].push_back(a);
    setHash[a] ^= rNum[b];
    setHash[b] ^= rNum[a];
  }
  for (int i = 1; i <= (n); i++) {
    for (auto x : edges[i]) {
      if (setHash[x] == setHash[i]) unite(x, i);
    }
  }
  for (int i = 1; i <= (n); i++) {
    find(i);
    if (setHash[i] != setHash[par[i]]) {
      cout << "NO";
      return 0;
    }
  }
  for (int i = 1; i <= (n); i++) {
    if (i != par[i]) continue;
    for (auto x : edges[i]) {
      if (x == par[x]) newEdges[i].push_back(x);
    }
  }
  for (int i = 1; i <= (n); i++) {
    if (i != par[i]) continue;
    if (newEdges[i].size() > 2) {
      cout << "NO";
      return 0;
    }
  }
  for (int i = 1; i <= (n); i++) {
    if (i != par[i]) continue;
    if (!vis[i] && newEdges[i].size() < 2) {
      number(i);
      totalNum += 5;
    }
  }
  for (int i = 1; i <= (n); i++) {
    if (i != par[i]) continue;
    if (!vis[i]) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES\n";
  for (int i = 1; i <= (n); i++) {
    cout << numbers[find(i)] << " ";
  }
  return 0;
}
