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 N = 400005, INF = 1e9;
int n, q, T[N], L[N], R[N], X[N], A[N], M[N], FS[N * 2], ID[N * 2];
inline void Minimize(int l, int r, int val) {
  l += n - 1;
  r += n;
  for (; l < r; l >>= 1, r >>= 1) {
    if (l & 1) FS[l] = min(FS[l], val), l++;
    if (r & 1) r--, FS[r] = min(FS[r], val);
  }
}
inline int GetMin(int i) {
  int Mn = INT_MAX;
  i += n - 1;
  for (; i; i >>= 1) Mn = min(Mn, FS[i]);
  return (Mn);
}
inline void Maximize(int i, int val) {
  i += n - 1;
  FS[i] = val;
  ID[i] = i - n + 1;
  for (; i; i >>= 1) {
    FS[i >> 1] = max(FS[i], FS[i ^ 1]);
    if (FS[i] == FS[i ^ 1])
      ID[i >> 1] = -1;
    else if (FS[i] > FS[i ^ 1])
      ID[i >> 1] = ID[i];
    else
      ID[i >> 1] = ID[i ^ 1];
  }
}
inline pair<int, int> GetMax(int l, int r) {
  int Mx = -1, id = -1;
  l += n - 1;
  r += n;
  for (; l < r; l >>= 1, r >>= 1) {
    if (l & 1) {
      if (Mx < FS[l])
        Mx = FS[l], id = ID[l];
      else if (Mx == FS[l])
        id = -1;
      l++;
    }
    if (r & 1) {
      r--;
      if (Mx < FS[r])
        Mx = FS[r], id = ID[r];
      else if (Mx == FS[r])
        id = -1;
    }
  }
  return (make_pair(Mx, id));
}
int main() {
  scanf("%d%d", &n, &q);
  memset(A, -1, sizeof(A));
  memset(FS, 63, sizeof(FS));
  for (int i = 1; i <= q; i++) {
    scanf("%d%d%d", &T[i], &L[i], &R[i]);
    if (T[i] == 1) {
      scanf("%d", &X[i]);
      Minimize(L[i], R[i], X[i]);
    } else if (A[L[i]] == -1)
      A[L[i]] = GetMin(L[i]);
  }
  for (int i = 1; i <= n; i++)
    if (A[i] == -1) A[i] = GetMin(i);
  memset(FS, -1, sizeof(FS));
  for (int i = 1; i <= n; i++) Maximize(i, A[i]);
  for (int i = 1; i <= q; i++) {
    if (T[i] == 1 && GetMax(L[i], R[i]).first != X[i])
      return !printf("NO");
    else if (T[i] == 2)
      Maximize(L[i], R[i]);
  }
  int cnt = 0;
  for (int i = 1; i <= n; i++)
    if (A[i] > INF) cnt++;
  if (cnt > 1) {
    cnt = 0;
    for (int i = 1; i <= n; i++)
      if (A[i] > INF) {
        if (!cnt)
          A[i] = (1 << 29) - 1;
        else
          A[i] = (1 << 29);
        cnt++;
      }
  } else {
    memset(FS, -1, sizeof(FS));
    for (int i = 1; i <= n; i++) Maximize(i, A[i]);
    for (int i = 1; i <= q; i++) {
      if (T[i] == 1) {
        int id = GetMax(L[i], R[i]).second;
        if (id != -1 && !M[id]) M[id] = 1;
      } else {
        Maximize(L[i], R[i]);
        if (!M[L[i]]) M[L[i]] = 2;
      }
    }
    vector<int> Cnt(30, 0);
    for (int j = 0; j < 30; j++)
      for (int i = 1; i <= n; i++)
        if (A[i] <= INF && ((A[i] >> j) & 1)) Cnt[j]++;
    int id = 0;
    A[0] = -1;
    for (int i = 1; i <= n; i++)
      if (M[i] != 1 && A[i] && A[i] <= INF && A[i] > A[id]) {
        int hb = 31 - __builtin_clz(A[i]);
        if (Cnt[hb] == 1) continue;
        id = i;
      }
    if (id > 0) {
      int hb = 31 - __builtin_clz(A[id]);
      A[id] = (1 << hb) - 1;
    }
    int Or = 0;
    id = -1;
    for (int i = 1; i <= n; i++) {
      if (A[i] <= INF)
        Or |= A[i];
      else
        id = i;
    }
    if (id != -1) {
      A[id] = 0;
      for (int i = 29; ~i; i--)
        if (!((Or >> i) & 1) && A[id] + (1 << i) <= INF) A[id] |= (1 << i);
    }
  }
  printf("YES\n");
  for (int i = 1; i <= n; i++) printf("%d ", A[i]);
  return 0;
}