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 INF = 2147483647;
const int MAXN = 400010;
int ls[MAXN], rs[MAXN], l[MAXN], r[MAXN], q[MAXN];
int tag[MAXN], n, m;
void build(int cur, int l, int r) {
  tag[cur] = 0;
  ls[cur] = l;
  rs[cur] = r;
  if (l == r) return;
  build(cur * 2, l, (l + r) / 2);
  build(cur * 2 + 1, (l + r) / 2 + 1, r);
}
void pushtag(int x) {
  if (ls[x] != rs[x]) {
    tag[x * 2] |= tag[x];
    tag[x * 2 + 1] |= tag[x];
    tag[x] = 0;
    return;
  }
}
void mark(int cur, int l, int r, int num) {
  if (ls[cur] > r || rs[cur] < l) return;
  if (ls[cur] >= l && rs[cur] <= r) {
    tag[cur] |= num;
    return;
  }
  pushtag(cur);
  mark(cur * 2, l, r, num);
  mark(cur * 2 + 1, l, r, num);
  tag[cur] = tag[cur * 2] & tag[cur * 2 + 1];
}
int check(int cur, int l, int r) {
  if (ls[cur] > r || rs[cur] < l) return INF;
  if (ls[cur] >= l && rs[cur] <= r) return tag[cur];
  pushtag(cur);
  int Cur = INF;
  Cur = check(cur * 2, l, r) & check(cur * 2 + 1, l, r);
  tag[cur] = tag[cur * 2] & tag[cur * 2 + 1];
  return Cur;
}
int main() {
  scanf("%d%d", &n, &m);
  build(1, 1, n);
  for (int i = 1; i <= m; ++i) {
    scanf("%d%d%d", &l[i], &r[i], &q[i]);
    mark(1, l[i], r[i], q[i]);
  }
  bool ok = 1;
  for (int i = 1; i <= m; ++i) {
    if (check(1, l[i], r[i]) != q[i]) {
      ok = 0;
      break;
    }
  }
  if (!ok)
    puts("NO");
  else {
    puts("YES");
    for (int i = 1; i <= n; ++i) printf("%d ", check(1, i, i));
  }
  return 0;
}
