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 inf = 1e9;
struct segtree {
  struct node {
    int max = -1;
    int id = -1;
    int lazy = inf;
    void apply(int x) {
      max = max < x ? max : x;
      lazy = lazy < x ? lazy : x;
    }
  };
  vector<node> t;
  int n;
  node merge(node l, node r) {
    node res;
    res.max = max(l.max, r.max);
    res.id = l.max > r.max ? l.id : r.id;
    return res;
  }
  inline void push(int v) {
    if (t[v].lazy != inf) {
      t[2 * v + 1].apply(t[v].lazy);
      t[2 * v + 2].apply(t[v].lazy);
      t[v].lazy = inf;
    }
  }
  inline void pull(int v) { t[v] = merge(t[2 * v + 1], t[2 * v + 2]); }
  void build(int v, int d, int l, int r) {
    if (r - l == 1) {
      t[v].max = d;
      t[v].id = l;
      return;
    }
    int m = (l + r) / 2;
    build(2 * v + 1, d, l, m);
    build(2 * v + 2, d, m, r);
    pull(v);
  }
  void smin(int v, int l, int r, int x, int tl, int tr) {
    if (r <= tl || tr <= l) return;
    if (l <= tl && tr <= r) return t[v].apply(x);
    push(v);
    int tm = (tl + tr) / 2;
    smin(2 * v + 1, l, r, x, tl, tm);
    smin(2 * v + 2, l, r, x, tm, tr);
    pull(v);
  }
  void modify(int v, int id, int x, int tl, int tr) {
    if (tr - tl == 1) {
      t[v].max = x;
      t[v].id = tl;
      return;
    }
    push(v);
    int tm = (tl + tr) / 2;
    id < tm ? modify(2 * v + 1, id, x, tl, tm)
            : modify(2 * v + 2, id, x, tm, tr);
    pull(v);
  }
  node get(int v, int l, int r, int tl, int tr) {
    if (r <= tl || tr <= l) return node();
    if (l <= tl && tr <= r) return t[v];
    push(v);
    int tm = (tl + tr) / 2;
    return merge(get(2 * v + 1, l, r, tl, tm), get(2 * v + 2, l, r, tm, tr));
  }
  segtree(int k, int v = 0) : n(k) {
    t.resize(4 * n);
    build(0, v, 0, n);
  }
};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  segtree st(n, inf), red(n, 0);
  vector<int> M(n, -1);
  vector<tuple<int, int, int>> que;
  for (int i = 0; i < m; i++) {
    int type;
    cin >> type;
    if (type == 1) {
      int l, r, x;
      cin >> l >> r >> x;
      --l;
      int val = red.get(0, l, r, 0, n).max;
      if (val > x) {
        cout << "NO" << '\n';
        return 0;
      } else if (val < x) {
        que.emplace_back(l, r, x);
      }
      st.smin(0, l, r, x, 0, n);
    } else {
      int k, d;
      cin >> k >> d;
      --k;
      que.emplace_back(k, d, -1);
      red.modify(0, k, d, 0, n);
      if (M[k] == -1) {
        M[k] = st.get(0, k, k + 1, 0, n).max;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if (M[i] == -1) {
      M[i] = st.get(0, i, i + 1, 0, n).max;
    } else {
      st.modify(0, i, M[i], 0, n);
    }
  }
  vector<int> b(n, -1);
  vector<bool> done(n, false);
  for (auto u : que) {
    if (get<2>(u) == -1) {
      int k = get<0>(u), d = get<1>(u);
      st.modify(0, k, d, 0, n);
    } else {
      int l = get<0>(u), r = get<1>(u), x = get<2>(u);
      segtree::node v = st.get(0, l, r, 0, n);
      int val = v.max, id = v.id;
      if (val < x) {
        cout << "NO" << '\n';
        return 0;
      }
      assert(val == x);
      b[id] = val;
      done[id] = 1;
    }
  }
  cout << "YES" << '\n';
  auto print = [&]() {
    for (int i = 0; i < n; i++) {
      cout << (b[i] == -1 ? M[i] : b[i]) << " \n"[i == n - 1];
    }
  };
  for (int i = 30; i >= 0; i--) {
    int first = -1, last = -1;
    bool found = false;
    for (int j = 0; j < n; j++) {
      if (!done[j]) {
        if (M[j] >= (1 << i)) {
          if (first == -1) first = j;
          last = j;
        }
      } else if (b[j] & (1 << i)) {
        found = true;
        break;
      }
    }
    if (found || (first == -1)) continue;
    if (first != last) {
      if (b[first] == -1) b[first] = 0;
      if (b[last] == -1) b[last] = 0;
      b[first] |= 1 << i;
      b[last] |= (1 << i) - 1;
      print();
      return 0;
    }
    if (b[first] == -1) b[first] = 0;
    b[first] |= 1 << i;
    M[first] -= 1 << i;
  }
  print();
  return 0;
}