We'll call an array of n non-negative integers a[1], a[2], ..., a[n] interesting, if it meets m constraints. The i-th of the m constraints consists of three integers li, ri, qi (1 ≤ li ≤ ri ≤ n) meaning that value <image> should be equal to qi. 

Your task is to find any interesting array of n elements or state that such array doesn't exist.

Expression x&y means the bitwise AND of numbers x and y. In programming languages C++, Java and Python this operation is represented as "&", in Pascal — as "and".

Input

The first line contains two integers n, m (1 ≤ n ≤ 105, 1 ≤ m ≤ 105) — the number of elements in the array and the number of limits.

Each of the next m lines contains three integers li, ri, qi (1 ≤ li ≤ ri ≤ n, 0 ≤ qi < 230) describing the i-th limit.

Output

If the interesting array exists, in the first line print "YES" (without the quotes) and in the second line print n integers a[1], a[2], ..., a[n] (0 ≤ a[i] < 230) decribing the interesting array. If there are multiple answers, print any of them.

If the interesting array doesn't exist, print "NO" (without the quotes) in the single line.

Examples

Input

3 1
1 3 3


Output

YES
3 3 3


Input

3 2
1 3 3
1 3 2


Output

NO
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
struct node {
  int l, r, m, v, lazy;
} s[MAXN << 2];
void push_up(int n) { s[n].v = s[n << 1].v & s[n << 1 | 1].v; }
void push_down(int n) {
  if (!s[n].lazy) return;
  s[n << 1].v |= s[n].lazy;
  s[n << 1].lazy |= s[n].lazy;
  s[n << 1 | 1].v |= s[n].lazy;
  s[n << 1 | 1].lazy |= s[n].lazy;
  s[n].lazy = 0;
}
void build(int l, int r, int n) {
  int m = (l + r) >> 1;
  s[n].l = l;
  s[n].r = r;
  s[n].m = m;
  s[n].v = 0;
  s[n].lazy = 0;
  if (r - l == 1) return;
  build(l, m, n << 1);
  build(m, r, n << 1 | 1);
}
void update(int l, int r, int n, int k) {
  if (s[n].l == l && s[n].r == r) {
    s[n].v |= k;
    s[n].lazy |= k;
    return;
  }
  push_down(n);
  if (r <= s[n].m)
    update(l, r, n << 1, k);
  else if (l >= s[n].m)
    update(l, r, n << 1 | 1, k);
  else {
    update(l, s[n].m, n << 1, k);
    update(s[n].m, r, n << 1 | 1, k);
  }
  push_up(n);
}
int query(int l, int r, int n) {
  if (s[n].l == l && s[n].r == r) return s[n].v;
  push_down(n);
  if (r <= s[n].m) return query(l, r, n << 1);
  if (l >= s[n].m) return query(l, r, n << 1 | 1);
  return query(l, s[n].m, n << 1) & query(s[n].m, r, n << 1 | 1);
}
int l[MAXN], r[MAXN], q[MAXN];
int main() {
  int m, n, i, j, k;
  scanf("%d%d", &n, &m);
  build(1, n + 1, 1);
  for (i = 1; i <= m; i++) {
    scanf("%d%d%d", &l[i], &r[i], &q[i]);
    for (j = 0; j < 30; j++) {
      if ((1 << j) & q[i]) {
        update(l[i], r[i] + 1, 1, (1 << j));
      }
    }
  }
  for (i = 1; i <= m; i++) {
    if (query(l[i], r[i] + 1, 1) != q[i]) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  for (i = 1; i <= n; i++) printf("%d ", query(i, i + 1, 1));
  cout << endl;
}
