#include <bits/stdc++.h>
using namespace std;
using namespace std;
typedef struct {
  int s, e;
} ele;
int cmp(ele a, ele b) { return a.s < b.s || (a.s == b.s && a.e < b.e); }
int operator==(ele a, ele b) { return cmp(a, b) == 0 && cmp(b, a) == 0; }
vector<ele> e[2][200514 * 4];
vector<ele>* r[100];
int rt;
void qry(int t, int qs, int qe, int ts, int te, int w) {
  if (qs <= ts && te <= qe) {
    r[rt++] = &e[t][w];
    return;
  }
  int m = (ts + te) / 2;
  if (qs < m) qry(t, qs, qe, ts, m, w + w + 0);
  if (m < qe) qry(t, qs, qe, m, te, w + w + 1);
}
void add(int t, int q, int ts, int te, int w, int x) {
  if (ts == q && ts + 1 == te) {
    e[t][w].push_back((ele){x, x});
    return;
  }
  int m = (ts + te) / 2;
  if (q < m)
    add(t, q, ts, m, w + w + 0, x);
  else
    add(t, q, m, te, w + w + 1, x);
}
void ini(int ts, int te, int w) {
  if (ts + 1 == te) {
    for (int z = 0; z < 2; z++) {
      sort((e[z][w]).begin(), (e[z][w]).end(), cmp);
      auto it1 = unique((e[z][w]).begin(), (e[z][w]).end());
      e[z][w].resize(it1 - e[z][w].begin());
    }
    return;
  }
  int m = (ts + te) / 2;
  ini(ts, m, w + w + 0);
  ini(m, te, w + w + 1);
  for (int z = 0; z < 2; z++) {
    vector<ele>&ll = e[z][w + w + 0], &rr = e[z][w + w + 1];
    int sa = ((int)ll.size());
    int sb = ((int)rr.size());
    int i = 0, j = 0;
    for (; i < sa && j < sb;) {
      if (ll[i].s == rr[j].s) {
        e[z][w].push_back((ele){ll[i].s, max(ll[i].e, rr[j].e)});
        i++;
        j++;
      } else if (ll[i].s < rr[j].s) {
        e[z][w].push_back((ele){ll[i].s, max(ll[i].e, rr[j].e)});
        i++;
      } else {
        e[z][w].push_back((ele){rr[j].s, max(ll[i].e, rr[j].e)});
        j++;
      }
    }
  }
}
int n, m, k, q, nn = 1 << 17;
void sol() {
  scanf("%d", &(m));
  scanf("%d %d", &(k), &(q));
  for (int i = 0; i < k; i++) {
    int x, y;
    scanf("%d %d", &(x), &(y));
    add(0, y, 0, nn, 1, x);
    add(1, x, 0, nn, 1, y);
  }
  ini(0, nn, 1);
  for (int i = 0; i < q; i++) {
    int a, b, c, d;
    scanf("%d %d", &(a), &(b));
    scanf("%d %d", &(c), &(d));
    int flag = 1, rflag = 0;
    flag = 1;
    rt = 0;
    qry(0, b, d + 1, 0, nn, 1);
    for (int j = 0; j < rt; j++) {
      auto it = lower_bound(r[j]->begin(), r[j]->end(), (ele){a, -1}, cmp);
      if (it == r[j]->end() || it->e > c) {
        flag = 0;
        break;
      }
    }
    rflag += flag;
    flag = 1;
    rt = 0;
    qry(1, a, c + 1, 0, nn, 1);
    for (int j = 0; j < rt; j++) {
      auto it = lower_bound(r[j]->begin(), r[j]->end(), (ele){b, -1}, cmp);
      if (it == r[j]->end() || it->e > d) {
        flag = 0;
        break;
      }
    }
    rflag += flag;
    puts(rflag ? "YES" : "NO");
  }
}
int main() {
  while (scanf("%d", &(n)) != EOF) sol();
  return 0;
}
