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, ST[1 << 18], Query[100000][3], RAQ(int, int, int, int, int);
void Update(int, int, int, int, int, int);
int main() {
  scanf("%d%d", &n, &m);
  for (int q = 0, l, r, x; q < m; q++) {
    scanf("%d%d%d", &l, &r, &x);
    l--, r--;
    Query[q][0] = l, Query[q][1] = r, Query[q][2] = x;
    Update(0, 0, n - 1, l, r, x);
  }
  for (int i = 0, l, r, x; i < m; i++) {
    l = Query[i][0], r = Query[i][1], x = Query[i][2];
    if (RAQ(0, 0, n - 1, l, r) != x) {
      puts("NO");
      return 0;
    }
  }
  puts("YES");
  for (int i = 0; i < n; i++) printf("%d ", RAQ(0, 0, n - 1, i, i));
}
void Update(int pos, int rl, int rr, int ql, int qr, int v) {
  if (rr < ql || qr < rl) return;
  if (ql <= rl && rr <= qr) {
    ST[pos] |= v;
    return;
  }
  int mid = (rl + rr) >> 1;
  Update((1 + (pos << 1)), rl, mid, ql, qr, v),
      Update((2 + (pos << 1)), mid + 1, rr, ql, qr, v);
}
int RAQ(int pos, int rl, int rr, int ql, int qr) {
  if (rr < ql || qr < rl) return INT_MAX;
  if (ql <= rl && rr <= qr) return ST[pos];
  int mid = (rl + rr) >> 1;
  ST[(1 + (pos << 1))] |= ST[pos], ST[(2 + (pos << 1))] |= ST[pos];
  return RAQ((1 + (pos << 1)), rl, mid, ql, qr) &
         RAQ((2 + (pos << 1)), mid + 1, rr, ql, qr);
}
