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 GCC optimize("O2")
#pragma GCC optimize("unroll-loops")
using namespace std;
const long double eps = 1e-7;
const int inf = 1000000000;
const long long INF = 10000000000000010LL;
const int mod = 1000000007;
const int MAXN = 300010, LOG = 20;
struct SEG1 {
  int seg[MAXN << 2];
  int build(int id, int tl, int tr, int A[]) {
    if (tr - tl == 1) return seg[id] = A[tl];
    int mid = (tl + tr) >> 1;
    return seg[id] =
               max(build(id << 1, tl, mid, A), build(id << 1 | 1, mid, tr, A));
  }
  void update(int id, int tl, int tr, int pos, int val) {
    if (pos < tl || tr <= pos) return;
    if (tr - tl == 1) {
      seg[id] = val;
      return;
    }
    int mid = (tl + tr) >> 1;
    update(id << 1, tl, mid, pos, val);
    update(id << 1 | 1, mid, tr, pos, val);
    seg[id] = max(seg[id << 1], seg[id << 1 | 1]);
  }
  int get(int id, int tl, int tr, int l, int r) {
    if (r <= tl || tr <= l) return 0;
    if (l <= tl && tr <= r) return seg[id];
    int mid = (tl + tr) >> 1;
    return max(get(id << 1, tl, mid, l, r), get(id << 1 | 1, mid, tr, l, r));
  }
} seg1;
struct SEG2 {
  int seg[MAXN << 2];
  SEG2() { memset(seg, 63, sizeof(seg)); }
  void update(int id, int tl, int tr, int l, int r, int val) {
    if (r <= tl || tr <= l) return;
    if (l <= tl && tr <= r) {
      seg[id] = min(seg[id], val);
      return;
    }
    int mid = (tl + tr) >> 1;
    update(id << 1, tl, mid, l, r, val);
    update(id << 1 | 1, mid, tr, l, r, val);
  }
  int get(int id, int tl, int tr, int pos) {
    if (tr - tl == 1) return seg[id];
    seg[id << 1] = min(seg[id << 1], seg[id]);
    seg[id << 1 | 1] = min(seg[id << 1 | 1], seg[id]);
    int mid = (tl + tr) >> 1;
    if (pos < mid) return get(id << 1, tl, mid, pos);
    return get(id << 1 | 1, mid, tr, pos);
  }
  void dfs(int id, int tl, int tr, int A[]) {
    if (tr - tl == 1) {
      A[tl] = seg[id];
      return;
    }
    seg[id << 1] = min(seg[id << 1], seg[id]);
    seg[id << 1 | 1] = min(seg[id << 1 | 1], seg[id]);
    int mid = (tl + tr) >> 1;
    dfs(id << 1, tl, mid, A);
    dfs(id << 1 | 1, mid, tr, A);
  }
} seg2;
int n, m, k, u, v, x, y, t, l, r, ans;
int A[MAXN];
bool mark[MAXN];
int T[MAXN], L[MAXN], R[MAXN], X[MAXN], Y[MAXN];
map<int, vector<int>> mp;
map<int, int> mpp;
vector<pair<int, int>> V;
int f(int x) { return (1 << (31 - __builtin_clz(x))) - 1; }
void go(int pos) {
  int num = A[pos];
  A[pos] = 0;
  for (int i = 30; i >= 0; i--)
    if ((ans & (1 << i)) == 0 && (A[pos] | (1 << i)) <= num)
      A[pos] |= (1 << i), ans |= (1 << i);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cerr << "f(1061109567)" << '=' << (f(1061109567)) << endl;
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    cin >> T[i];
    if (T[i] == 2) {
      cin >> X[i] >> Y[i];
      seg1.update(1, 1, n + 1, X[i], Y[i]);
      if (!mark[X[i]]) {
        mark[X[i]] = 1;
        V.push_back({X[i], seg2.get(1, 1, n + 1, X[i])});
      }
      continue;
    }
    cin >> L[i] >> R[i] >> X[i];
    int mx = seg1.get(1, 1, n + 1, L[i], R[i] + 1);
    if (mx > X[i]) return cout << "NO" << '\n', 0;
    if (mx < X[i]) mpp[X[i]] = i;
    seg2.update(1, 1, n + 1, L[i], R[i] + 1, X[i]);
  }
  seg2.dfs(1, 1, n + 1, A);
  for (pair<int, int> p : V) A[p.first] = p.second;
  seg1.build(1, 1, n + 1, A);
  for (int i = 1; i <= m; i++) {
    if (T[i] == 2)
      seg1.update(1, 1, n + 1, X[i], Y[i]);
    else if (seg1.get(1, 1, n + 1, L[i], R[i] + 1) != X[i])
      return cout << "NO" << '\n', 0;
  }
  for (int i = 1; i <= n; i++) mp[A[i] = min(A[i], inf)].push_back(i);
  for (auto it : mp)
    if (it.first && mpp.count(it.first)) {
      int l = L[mpp[it.first]], r = R[mpp[it.first]];
      bool flag = 0;
      for (int i : it.second) {
        if (l <= i && i <= r) {
          if (!flag)
            flag = 1;
          else
            A[i] = f(A[i]);
        } else
          A[i] = f(A[i]);
        ans |= A[i];
      }
    }
  for (auto it : mp)
    if (it.first && !mpp.count(it.first))
      for (int i : it.second) go(i);
  cout << "YES\n";
  for (int i = 1; i <= n; i++) cout << A[i] << " \n"[i == n];
  cerr << "ans" << '=' << (ans) << endl;
  return 0;
}