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 = 3e5 + 20;
const int MX = 1000 * 1000 * 1000;
struct node {
  int mx, t, pos;
  node() {
    mx = pos = -1;
    t = 0;
  }
};
node seg[maxn * 4], void_node;
int type[maxn], l[maxn], r[maxn], p[maxn], x[maxn], mn[maxn * 4], val[maxn];
bool is[maxn], wt[maxn];
vector<int> shits[maxn];
node merge(node a, node b) {
  node c;
  c.mx = max(a.mx, b.mx);
  if (c.mx == a.mx) c.t += a.t, c.pos = a.pos;
  if (c.mx == b.mx) c.t += b.t, c.pos = b.pos;
  return c;
}
void build(int s, int e, int v) {
  if (e - s < 2) {
    seg[v].mx = val[s];
    seg[v].pos = s;
    seg[v].t = 1;
    return;
  }
  int m = (s + e) / 2;
  build(s, m, 2 * v);
  build(m, e, 2 * v + 1);
  seg[v] = merge(seg[2 * v], seg[2 * v + 1]);
}
node Get(int l, int r, int s, int e, int v) {
  if (l <= s && e <= r) return seg[v];
  if (r <= s || e <= l) return void_node;
  int m = (s + e) / 2;
  return merge(Get(l, r, s, m, 2 * v), Get(l, r, m, e, 2 * v + 1));
}
void change(int p, int val, int s, int e, int v) {
  if (e - s < 2) {
    seg[v].mx = val;
    seg[v].t = 1;
    return;
  }
  int m = (s + e) / 2;
  if (p < m)
    change(p, val, s, m, 2 * v);
  else
    change(p, val, m, e, 2 * v + 1);
  seg[v] = merge(seg[2 * v], seg[2 * v + 1]);
}
void update(int l, int r, int val, int s, int e, int v) {
  if (l <= s && e <= r) {
    mn[v] = min(mn[v], val);
    return;
  }
  if (r <= s || e <= l) return;
  int m = (s + e) / 2;
  update(l, r, val, s, m, 2 * v);
  update(l, r, val, m, e, 2 * v + 1);
}
int get(int p, int s, int e, int v) {
  int ans = mn[v];
  if (e - s < 2) return ans;
  int m = (s + e) / 2;
  if (p < m)
    return min(ans, get(p, s, m, 2 * v));
  else
    return min(ans, get(p, m, e, 2 * v + 1));
}
int main() {
  int n, q;
  scanf("%d%d", &n, &q);
  memset(mn, 63, sizeof mn);
  for (int i = 0; i < q; i++) {
    scanf("%d", &type[i]);
    if (type[i] == 1) {
      scanf("%d%d%d", &l[i], &r[i], &x[i]);
      l[i]--;
      update(l[i], r[i], x[i], 0, n, 1);
    } else {
      scanf("%d%d", &p[i], &x[i]);
      p[i]--;
      if (!is[p[i]]) val[p[i]] = get(p[i], 0, n, 1), is[p[i]] = 1;
    }
  }
  for (int i = 0; i < n; i++)
    if (!is[i]) val[i] = get(i, 0, n, 1);
  memset(is, 0, sizeof is);
  build(0, n, 1);
  for (int i = 0; i < q; i++) {
    if (type[i] == 1) {
      node res = Get(l[i], r[i], 0, n, 1);
      if (res.mx != x[i]) return printf("NO\n"), 0;
      if (res.t == 1 && !wt[res.pos]) is[res.pos] = 1;
    } else
      change(p[i], x[i], 0, n, 1), wt[p[i]] = 1;
  }
  int T = 0;
  for (int i = 0; i < n; i++)
    if (val[i] > MX) T++;
  printf("YES\n");
  if (T > 1) {
    for (int i = 0; i < n; i++)
      if (val[i] > MX) {
        if (T > 1)
          val[i] = MX, T--;
        else
          val[i] = ((1 << 30) - 1) ^ (MX);
      }
  } else {
    set<int> st;
    for (int i = 0; i < n; i++)
      if (!is[i] && val[i] <= MX && val[i] > 0)
        shits[31 - __builtin_clz(val[i])].push_back(i);
    for (int i = 30; i >= 0; i--)
      if ((int)shits[i].size() > 1) {
        int k = shits[i].back();
        val[k] = (1 << i) - 1;
        break;
      }
    int Or = 0;
    for (int i = 0; i < n; i++)
      if (val[i] <= MX) Or |= val[i];
    for (int i = 0; i < n; i++)
      if (val[i] > MX) {
        val[i] = 0;
        for (int j = 30; j >= 0; j--)
          if (!(((Or) >> (j)) & 1) && (val[i] ^ (1 << j)) <= MX)
            val[i] ^= (1 << j);
      }
  }
  for (int i = 0; i < n; i++) printf("%d ", val[i]);
  printf("\n");
}