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;
int n, m;
int tree[400005];
bool flag;
struct q {
  int l, r, q;
} q[100005];
void add(int l, int r, int q, int L, int R, int i) {
  if (l == L && r == R) {
    tree[i] = tree[i] | q;
    return;
  }
  int M = (L + R) / 2;
  if (r <= M)
    add(l, r, q, L, M, i * 2);
  else if (l > M)
    add(l, r, q, M + 1, R, i * 2 + 1);
  else {
    add(l, M, q, L, M, i * 2);
    add(M + 1, r, q, M + 1, R, i * 2 + 1);
  }
}
int AND(int l, int r, int L, int R, int i) {
  if (l == L && r == R) return tree[i];
  int M = (L + R) / 2;
  if (r <= M) return AND(l, r, L, M, i * 2);
  if (l > M) return AND(l, r, M + 1, R, i * 2 + 1);
  return AND(l, M, L, M, i * 2) & AND(M + 1, r, M + 1, R, i * 2 + 1);
}
int read(int f, int l, int r, int i) {
  if (l == r) return tree[i];
  int M = (l + r) / 2;
  if (f <= M) return tree[i] | read(f, l, M, i * 2);
  if (f > M) return tree[i] | read(f, M + 1, r, i * 2 + 1);
}
int main() {
  int k = 1;
  while (cin >> n >> m) {
    memset(tree, 0, sizeof(tree));
    flag = 0;
    for (int i = 0; i < m; i++) {
      scanf("%d %d %d", &q[i].l, &q[i].r, &q[i].q);
      q[i].l--;
      q[i].r--;
    }
    for (int i = 0; i < m; i++) add(q[i].l, q[i].r, q[i].q, 0, n - 1, 1);
    for (int i = 0; i < m; i++)
      if (AND(q[i].l, q[i].r, 0, n - 1, 1) != q[i].q) flag = 1;
    if (flag)
      cout << "NO" << endl;
    else {
      cout << "YES" << endl;
      for (int i = 0; i < n; i++) {
        if (i) printf(" ");
        printf("%d", read(i, 0, n - 1, 1));
      }
      printf("\n");
    }
  }
  return 0;
}
