#include <bits/stdc++.h>
using namespace std;
using namespace std;
const int N = 400005;
const int inf = 2000000000;
struct my {
  int l, r, u, d, n, t;
  my(int l, int r, int d, int u, int n, int t)
      : l(l), r(r), d(d), u(u), n(n), t(t) {}
  my() {}
};
my a[N];
char ans[N];
int tree[4 * N], d, u, j, n, m, k, q, i, l, r;
bool comp1(my a, my b) {
  if (a.t == 1 && b.t == 1) return (a.l < b.l);
  if (a.t == 1 && b.t == 2) return (a.l <= b.r);
  if (a.t == 2 && b.t == 2) return (a.r < b.r);
  if (a.t == 2 && b.t == 1) return (a.r < b.l);
}
bool comp2(my a, my b) {
  if (a.t == 1 && b.t == 1) return (a.r < b.r);
  if (a.t == 1 && b.t == 2) return (a.r <= b.u);
  if (a.t == 2 && b.t == 2) return (a.u < b.u);
  if (a.t == 2 && b.t == 1) return (a.u < b.r);
}
void upd(int v, int first) {
  v = v + j - 1;
  tree[v] = first;
  while (v > 1) {
    v /= 2;
    tree[v] = min(tree[v * 2], tree[v * 2 + 1]);
  }
}
int get(int v, int lv, int rv, int l, int r) {
  if (lv > r || rv < l) return inf;
  if (lv >= l && rv <= r) return tree[v];
  int mid = (lv + rv) / 2;
  return min(get(v * 2, lv, mid, l, r), get(v * 2 + 1, mid + 1, rv, l, r));
}
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cin >> n >> m >> k >> q;
  for (i = 1; i <= k; i++) {
    cin >> l >> r;
    a[i] = my(l, r, l, r, i, 1);
  }
  for (i = 1; i <= q; i++) {
    cin >> l >> d >> r >> u;
    a[k + i] = my(l, r, d, u, i, 2);
  }
  int sz = k + q;
  j = 1;
  while (j < m) j *= 2;
  sort(a + 1, a + sz + 1, comp1);
  for (i = 1; i <= sz; i++) {
    if (a[i].t == 1)
      upd(a[i].r, a[i].l);
    else {
      int f = get(1, 1, j, a[i].d, a[i].u);
      ans[a[i].n] |= (f >= a[i].l);
    }
  }
  memset(tree, 0, sizeof(tree));
  j = 1;
  while (j < n) j *= 2;
  sort(a + 1, a + sz + 1, comp2);
  for (i = 1; i <= sz; i++) {
    if (a[i].t == 1)
      upd(a[i].l, a[i].r);
    else {
      int f = get(1, 1, j, a[i].l, a[i].r);
      ans[a[i].n] |= (f >= a[i].d);
    }
  }
  for (i = 1; i <= q; i++) cout << (ans[i] ? "YES" : "NO") << "\n";
}
