It is a very important day for Katya. She has a test in a programming class. As always, she was given an interesting problem that she solved very fast. Can you solve that problem?

You are given n ordered segments sets. Each segment can be represented as a pair of two integers [l, r] where l≤ r. Each set can contain an arbitrary number of segments (even 0). It is possible that some segments are equal.

You are also given m queries, each of them can be represented as four numbers: a, b, x, y. For each segment, find out whether it is true that each set p (a≤ p≤ b) contains at least one segment [l, r] that lies entirely on the segment [x, y], that is x≤ l≤ r≤ y. 

Find out the answer to each query.

Note that you need to solve this problem online. That is, you will get a new query only after you print the answer for the previous query.

Input

The first line contains three integers n, m, and k (1≤ n,m≤ 10^5, 1≤ k≤ 3⋅10^5) — the number of sets, queries, and segments respectively.

Each of the next k lines contains three integers l, r, and p (1≤ l≤ r≤ 10^9, 1≤ p≤ n) — the limits of the segment and the index of a set, to which this segment belongs.

Each of the next m lines contains four integers a, b, x, y (1≤ a≤ b≤ n, 1≤ x≤ y≤ 10^9) — the description of the query.

Output

For each query, print "yes" or "no" in a new line.

Interaction

After printing a query, do not forget to output end of line and flush the output. Otherwise, you will get Idleness limit exceeded. To do this, use:

  * fflush(stdout) or cout.flush() in C++;
  * System.out.flush() in Java;
  * flush(output) in Pascal;
  * stdout.flush() in Python;
  * see documentation for other languages.

Example

Input


5 5 9
3 6 3
1 3 1
2 4 2
1 2 3
4 6 5
2 5 3
7 9 4
2 3 1
4 10 4
1 2 2 3
1 2 2 4
1 3 1 5
2 3 3 6
2 4 2 9


Output


no
yes
yes
no
yes

Note

For the first query, the answer is negative since the second set does not contain a segment that lies on the segment [2, 3].

In the second query, the first set contains [2, 3], and the second set contains [2, 4].

In the third query, the first set contains [2, 3], the second set contains [2, 4], and the third set contains [2, 5].

In the fourth query, the second set does not contain a segment that lies on the segment [3, 6].

In the fifth query, the second set contains [2, 4], the third set contains [2, 5], and the fourth contains [7, 9].
#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5, Inf = 1e9 + 1312;
int idx, cur, tree[25 * N], le_[25 * N], ri_[25 * N], node[N], n, m, k, i, q;
set<int> S;
map<int, int> ind;
pair<pair<int, int>, int> p[N];
vector<pair<int, int> > st[N];
vector<int> x;
void build(int u, int l, int r) {
  if (l == r) {
    tree[u] = Inf;
    return;
  }
  idx++;
  le_[u] = idx;
  idx++;
  ri_[u] = idx;
  int mid = (l + r) / 2;
  build(le_[u], l, mid);
  build(ri_[u], mid + 1, r);
  tree[u] = Inf;
}
void update(int u, int ind, int l, int r, int val) {
  if (l > ind || r < ind) return;
  if (l == r) {
    tree[idx] = min(tree[u], val);
    return;
  }
  int mid = (l + r) / 2, x = idx;
  le_[x] = le_[u];
  ri_[x] = ri_[u];
  idx++;
  if (ind <= mid) {
    le_[x] = idx;
  } else
    ri_[x] = idx;
  update(le_[u], ind, l, mid, val);
  update(ri_[u], ind, mid + 1, r, val);
  tree[x] = max(tree[le_[x]], tree[ri_[x]]);
}
int getans(int u, int start, int end, int l, int r) {
  if (l > end || r < start) return 0;
  if (start <= l && r <= end) {
    return tree[u];
  }
  int mid = (l + r) / 2;
  return max(getans(le_[u], start, end, l, mid),
             getans(ri_[u], start, end, mid + 1, r));
}
int main() {
  cin >> n >> q >> k;
  for (i = 1; i <= k; i++) {
    cin >> p[i].first.first >> p[i].first.second >> p[i].second;
    x.push_back(p[i].first.first);
  }
  sort(x.begin(), x.end());
  for (i = 0; i < x.size(); i++) {
    if (!i || x[i] != x[i - 1]) cur++;
    ind[x[i]] = cur;
    S.insert(x[i]);
  }
  for (i = 1; i <= k; i++) {
    st[ind[p[i].first.first]].push_back({p[i].first.second, p[i].second});
  }
  idx = 1;
  node[cur + 1] = 1;
  build(1, 1, n);
  for (i = cur; i >= 1; i--) {
    int bef = node[i + 1];
    for (int j = 0; j < st[i].size(); j++) {
      idx++;
      int c = idx;
      update(bef, st[i][j].second, 1, n, st[i][j].first);
      bef = c;
    }
    node[i] = bef;
  }
  S.insert(Inf);
  ind[Inf] = cur + 1;
  while (q--) {
    int a, b, l, r;
    cin >> a >> b >> l >> r;
    if (getans(node[ind[*S.upper_bound(l - 1)]], a, b, 1, n) <= r)
      cout << "yes" << endl;
    else
      cout << "no" << endl;
  }
}
