Problem: Zane once had a good sequence a consisting of n integers a1, a2, ..., an — but he has lost it.

A sequence is said to be good if and only if all of its integers are non-negative and do not exceed 109 in value.

<image>

However, Zane remembers having played around with his sequence by applying m operations to it.

There are two types of operations:

1. Find the maximum value of integers with indices i such that l ≤ i ≤ r, given l and r.

2. Assign d as the value of the integer with index k, given k and d.

After he finished playing, he restored his sequence to the state it was before any operations were applied. That is, sequence a was no longer affected by the applied type 2 operations. Then, he lost his sequence at some time between now and then.

Fortunately, Zane remembers all the operations and the order he applied them to his sequence, along with the distinct results of all type 1 operations. Moreover, among all good sequences that would produce the same results when the same operations are applied in the same order, he knows that his sequence a has the greatest cuteness.

We define cuteness of a sequence as the bitwise OR result of all integers in such sequence. For example, the cuteness of Zane's sequence a is a1 OR a2 OR ... OR an.

Zane understands that it might not be possible to recover exactly the lost sequence given his information, so he would be happy to get any good sequence b consisting of n integers b1, b2, ..., bn that:

1. would give the same results when the same operations are applied in the same order, and

2. has the same cuteness as that of Zane's original sequence a.

If there is such a sequence, find it. Otherwise, it means that Zane must have remembered something incorrectly, which is possible.

Input

The first line contains two integers n and m (1 ≤ n, m ≤ 3·105) — the number of integers in Zane's original sequence and the number of operations that have been applied to the sequence, respectively.

The i-th of the following m lines starts with one integer ti (<image>) — the type of the i-th operation.

If the operation is type 1 (ti = 1), then three integers li, ri, and xi follow (1 ≤ li ≤ ri ≤ n, 0 ≤ xi ≤ 109) — the leftmost index to be considered, the rightmost index to be considered, and the maximum value of all integers with indices between li and ri, inclusive, respectively.

If the operation is type 2 (ti = 2), then two integers ki and di follow (1 ≤ ki ≤ n, 0 ≤ di ≤ 109) — meaning that the integer with index ki should become di after this operation.

It is guaranteed that xi ≠ xj for all pairs (i, j) where 1 ≤ i < j ≤ m and ti = tj = 1.

The operations are given in the same order they were applied. That is, the operation that is given first was applied first, the operation that is given second was applied second, and so on.

Output

If there does not exist a valid good sequence, print "NO" (without quotation marks) in the first line.

Otherwise, print "YES" (without quotation marks) in the first line, and print n space-separated integers b1, b2, ..., bn (0 ≤ bi ≤ 109) in the second line.

If there are multiple answers, print any of them.

Examples

Input

5 4
1 1 5 19
1 2 5 1
2 5 100
1 1 5 100


Output

YES
19 0 0 0 1


Input

5 2
1 1 5 0
1 1 5 100


Output

NO

Note

In the first sample, it is easy to verify that this good sequence is valid. In particular, its cuteness is 19 OR 0 OR 0 OR 0 OR 1 =  19.

In the second sample, the two operations clearly contradict, so there is no such good sequence.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)3e5 + 1, maxd = 30, maxv = (int)1e9, INF = 0x3f3f3f3f;
int n, m, upp[maxn], seg[maxn << 1 | 1], ord[maxn];
struct Info {
  int typ, x, y, z;
} que[maxn];
inline int seg_idx(int L, int R) { return (L + R) | (L < R); }
void seg_dfs(int L, int R, int v = INF) {
  int rt = seg_idx(L, R);
  v = min(v, seg[rt]);
  if (L == R) {
    if (upp[L] == -1) upp[L] = v;
    seg[rt] = upp[L];
  } else {
    int M = (L + R) >> 1;
    seg_dfs(L, M, v);
    seg_dfs(M + 1, R, v);
    seg[rt] = max(seg[seg_idx(L, M)], seg[seg_idx(M + 1, R)]);
  }
}
void seg_upd(int L, int R, int l, int r, int v, bool ass = 0) {
  int rt = seg_idx(L, R);
  if (l <= L && R <= r) {
    seg[rt] = ass ? v : min(seg[rt], v);
  } else {
    int M = (L + R) >> 1;
    if (l <= M) seg_upd(L, M, l, r, v, ass);
    if (r > M) seg_upd(M + 1, R, l, r, v, ass);
    if (ass) seg[rt] = max(seg[seg_idx(L, M)], seg[seg_idx(M + 1, R)]);
  }
}
int seg_que(int L, int R, int x) {
  int ret = seg[seg_idx(x, x)];
  while (L < R) {
    ret = min(ret, seg[seg_idx(L, R)]);
    int M = (L + R) >> 1;
    if (x <= M) {
      R = M;
    } else {
      L = M + 1;
    }
  }
  return ret;
}
int seg_que(int L, int R, int l, int r) {
  if (l <= L && R <= r) return seg[seg_idx(L, R)];
  int M = (L + R) >> 1;
  int lft = l <= M ? seg_que(L, M, l, r) : 0;
  int rht = r > M ? seg_que(M + 1, R, l, r) : 0;
  return max(lft, rht);
}
int main() {
  scanf("%d%d", &n, &m);
  memset(upp + 1, -1, n * sizeof(int));
  memset(seg + 1, 0x3f, (n << 1) * sizeof(int));
  for (int i = 1; i <= m; ++i) {
    Info &cur = que[i];
    scanf("%d%d%d", &cur.typ, &cur.x, &cur.y);
    if (cur.typ == 1) {
      scanf("%d", &cur.z);
      seg_upd(1, n, cur.x, cur.y, cur.z);
    } else if (upp[cur.x] == -1) {
      upp[cur.x] = seg_que(1, n, cur.x);
    }
  }
  seg_dfs(1, n);
  for (int i = 1; i <= m; ++i) {
    Info &cur = que[i];
    if (cur.typ != 1) {
      seg_upd(1, n, cur.x, cur.x, cur.y, 1);
    } else if (seg_que(1, n, cur.x, cur.y) != cur.z) {
      puts("NO");
      return 0;
    }
  }
  for (int i = 1; i <= n; ++i) ord[i] = i;
  sort(ord + 1, ord + n + 1,
       [&](int const &u, int const &v) { return upp[u] < upp[v]; });
  int ans = 0;
  for (int i = 1; i <= n;) {
    int val = upp[ord[i]], adt;
    if (val < INF) {
      ans |= val;
      for (adt = 0; (adt << 1 | 1) <= val; adt = adt << 1 | 1)
        ;
    } else {
      adt = 0;
      for (int j = 1 << (maxd - 1); j; j >>= 1)
        if (!(ans & j) && (adt | j) <= maxv) adt |= j;
      upp[ord[i]] = adt;
      ans |= adt;
      adt = ((1 << maxd) - 1) ^ ans;
    }
    for (++i; i <= n && upp[ord[i]] == val; ++i) {
      upp[ord[i]] = adt;
      ans |= adt;
    }
  }
  puts("YES");
  for (int i = 1; i <= n; ++i) printf("%d%c", upp[i], " \n"[i == n]);
  return 0;
}