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 = 1e5 + 5;
int sum[maxn << 2];
int mark[maxn << 2];
struct node {
  int l, r, q;
} no[maxn];
void PushDown(int rt) {
  if (!mark[rt]) return;
  sum[rt << 1] = sum[rt << 1] | mark[rt];
  sum[rt << 1 | 1] = sum[rt << 1 | 1] | mark[rt];
  mark[rt << 1] = mark[rt << 1] | mark[rt];
  mark[rt << 1 | 1] = mark[rt << 1 | 1] | mark[rt];
  mark[rt] = 0;
}
int query(int L, int R, int l, int r, int rt) {
  if (L <= l && r <= R) {
    return sum[rt];
  }
  PushDown(rt);
  int m = l + r >> 1;
  if (L > m) return query(L, R, m + 1, r, rt << 1 | 1);
  if (R <= m) return query(L, R, l, m, rt << 1);
  return query(L, R, l, m, rt << 1) & query(L, R, m + 1, r, rt << 1 | 1);
}
void update(int L, int R, int c, int l, int r, int rt) {
  if (L <= l && r <= R) {
    sum[rt] = sum[rt] | c;
    mark[rt] = mark[rt] | c;
    return;
  }
  PushDown(rt);
  int m = (l + r) >> 1;
  if (L <= m) update(L, R, c, l, m, rt << 1);
  if (m < R) update(L, R, c, m + 1, r, rt << 1 | 1);
}
void print(int pos, int l, int r, int rt) {
  if (l == r) {
    cout << sum[rt] << " ";
    return;
  }
  PushDown(rt);
  int m = l + r >> 1;
  if (pos <= m)
    print(pos, l, m, rt << 1);
  else
    print(pos, m + 1, r, rt << 1 | 1);
}
int main() {
  int m, n;
  while (~scanf("%d%d", &n, &m)) {
    memset(sum, 0, sizeof(sum));
    memset(mark, 0, sizeof(mark));
    for (int i = 0; i < m; i++) {
      scanf("%d%d%d", &no[i].l, &no[i].r, &no[i].q);
      update(no[i].l, no[i].r, no[i].q, 1, n, 1);
    }
    int flag = 1;
    for (int i = 0; i < m; i++) {
      int x = query(no[i].l, no[i].r, 1, n, 1);
      if (x != no[i].q) {
        flag = 0;
        break;
      }
    }
    if (flag == 0)
      printf("NO\n");
    else {
      printf("YES\n");
      for (int i = 1; i <= n; i++) {
        print(i, 1, n, 1);
      }
      puts("");
    }
  }
  return 0;
}
