#include <bits/stdc++.h>
using namespace std;
inline void read(int &res) {
  register int g = 1;
  register char ch = getchar();
  res = 0;
  while (!isdigit(ch)) {
    if (ch == '-') g = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    res = (res << 3) + (res << 1) + (ch ^ 48);
    ch = getchar();
  }
  res *= g;
}
struct P {
  int t, l, r;
  friend bool operator<(P a, P b) { return a.t > b.t; }
} p[1010];
int n, m, a[1010], sn;
int main() {
  read(n);
  read(m);
  for (register int i = 1; i <= m; i++) {
    read(p[i].t);
    read(p[i].l);
    read(p[i].r);
  }
  sort(p + 1, p + 1 + m);
  memset(a, 0, sizeof(a));
  for (register int i = 1; i <= m; i++) {
    if (p[i].t) {
      p[i].r = min(p[i].r, n);
      for (register int j = p[i].l; j <= p[i].r - 1; j++) {
        a[j] = 1;
      }
    } else {
      sn = 1;
      if (p[i].l == p[i].r) continue;
      p[i].r = min(p[i].r, n);
      for (register int j = p[i].l; j <= p[i].r - 1; j++) {
        if (a[j] != 1) {
          a[j] = -1;
          sn = 0;
          break;
        }
      }
      if (sn) break;
    }
  }
  if (sn) {
    printf("NO");
    return 0;
  }
  printf("YES\n");
  sn = 10000;
  for (register int i = 1; i <= n; i++) {
    printf("%d ", sn);
    sn += a[i];
  }
  return 0;
}
