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>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
const int INF = 1 << 30;
const int Mod = 1000000007;
int lim[300010];
bool fix[300010];
map<int, int> mp;
struct Operation {
  int kind, l, r, v;
} op[300010];
struct Segment_Tree {
  int mx[300010 << 2], tag[300010 << 2];
  void Push_Down(int x) {
    if (tag[x] == INF) return;
    int lc = x << 1, rc = lc | 1;
    mx[lc] = min(mx[lc], tag[x]);
    mx[rc] = min(mx[rc], tag[x]);
    tag[lc] = min(tag[lc], tag[x]);
    tag[rc] = min(tag[rc], tag[x]);
    tag[x] = INF;
  }
  void Maintain(int x) { mx[x] = max(mx[x << 1], mx[x << 1 | 1]); }
  void Build(int x, int l, int r) {
    if (l == r) {
      mx[x] = lim[l];
      return;
    }
    int mid = (l + r) >> 1;
    Build(x << 1, l, mid);
    Build(x << 1 | 1, mid + 1, r);
    Maintain(x);
    tag[x] = INF;
  }
  void Modify(int x, int l, int r, int pos, int val) {
    if (l == r) {
      mx[x] = val;
      return;
    }
    Push_Down(x);
    int mid = (l + r) >> 1;
    if (pos <= mid)
      Modify(x << 1, l, mid, pos, val);
    else
      Modify(x << 1 | 1, mid + 1, r, pos, val);
    Maintain(x);
  }
  void Cover(int x, int L, int R, int l, int r, int val) {
    if (l <= L && r >= R) {
      mx[x] = min(mx[x], val);
      tag[x] = min(tag[x], val);
      return;
    }
    if (r < L || l > R) return;
    Push_Down(x);
    int Mid = (L + R) >> 1;
    Cover(x << 1, L, Mid, l, r, val);
    Cover(x << 1 | 1, Mid + 1, R, l, r, val);
    Maintain(x);
  }
  int Query(int x, int l, int r, int pos) {
    if (l == r) return mx[x];
    Push_Down(x);
    int mid = (l + r) >> 1;
    if (pos <= mid)
      return Query(x << 1, l, mid, pos);
    else
      return Query(x << 1 | 1, mid + 1, r, pos);
  }
  int Query(int x, int L, int R, int l, int r) {
    if (l <= L && r >= R) return mx[x];
    if (r < L || l > R) return -INF;
    int Mid = (L + R) >> 1;
    return max(Query(x << 1, L, Mid, l, r),
               Query(x << 1 | 1, Mid + 1, R, l, r));
  }
} tree[2];
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n; ++i) lim[i] = INF;
  tree[0].Build(1, 1, n);
  for (int i = 1; i <= m; ++i) {
    scanf("%d", &op[i].kind);
    if (op[i].kind == 1) {
      scanf("%d %d %d", &op[i].l, &op[i].r, &op[i].v);
      tree[0].Cover(1, 1, n, op[i].l, op[i].r, op[i].v);
    } else {
      scanf("%d %d", &op[i].l, &op[i].v);
      if (!fix[op[i].l])
        lim[op[i].l] = tree[0].Query(1, 1, n, op[i].l), fix[op[i].l] = true;
    }
  }
  for (int i = 1; i <= n; ++i)
    if (!fix[i]) lim[i] = tree[0].Query(1, 1, n, i);
  tree[1].Build(1, 1, n);
  bool f = true;
  for (int i = 1; i <= m; ++i) {
    if (op[i].kind == 1) {
      if (tree[1].Query(1, 1, n, op[i].l, op[i].r) != op[i].v) f = false;
    } else
      tree[1].Modify(1, 1, n, op[i].l, op[i].v);
  }
  if (!f) {
    puts("NO");
    return 0;
  }
  for (int i = 1; i <= n; ++i) mp[lim[i]]++;
  if (mp[INF] >= 2) {
    for (int i = 1; i <= n; ++i) {
      if (lim[i] != INF) continue;
      mp[INF]--;
      lim[i] = 1 << 29;
      if (!mp[INF]) lim[i] = (1 << 29) - 1;
    }
  } else {
    int res = 0;
    for (int i = 1; i <= n; ++i) {
      if (lim[i] == 0 || lim[i] == INF) continue;
      mp[lim[i]]--;
      if (mp[lim[i]] == 0)
        res |= lim[i];
      else {
        int k = 1;
        while (k <= lim[i]) k <<= 1;
        k >>= 1;
        lim[i] = k - 1;
        res |= lim[i];
      }
    }
    for (int i = 1; i <= n; ++i) {
      if (lim[i] == INF) {
        lim[i] = 0;
        for (int j = 29; j >= 0; j--) {
          if (!(res & (1 << j)) && lim[i] + (1 << j) <= 1000000000)
            lim[i] += 1 << j;
        }
      }
    }
  }
  puts("YES");
  for (int i = 1; i <= n; ++i) printf("%d%c", lim[i], i == n ? '\n' : ' ');
  return 0;
}