#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 10;
const int MN = 1e5 + 10;
struct query {
  int l1, l2, r1, r2, id;
} qr[MN << 1];
int n, m, k, q;
bool ans[MN << 1];
int seg[MN << 2];
vector<int> adj[2][MN];
bool cmp1(const query &a, const query &b) { return a.r1 < b.r1; }
bool cmp2(const query &a, const query &b) { return a.r2 < b.r2; }
void upd(int id, int b, int e, int p, int val) {
  if (e - b == 1) {
    seg[id] = val;
    return;
  }
  int mid = b + e >> 1;
  if (p < mid)
    upd(id << 1, b, mid, p, val);
  else
    upd(id << 1 | 1, mid, e, p, val);
  seg[id] = min(seg[id << 1], seg[id << 1 | 1]);
}
int get(int id, int b, int e, int l, int r) {
  if (r <= b || e <= l) return INF;
  if (l <= b && e <= r) return seg[id];
  int mid = b + e >> 1;
  return min(get(id << 1, b, mid, l, r), get(id << 1 | 1, mid, e, l, r));
}
int main() {
  ios_base ::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> m >> k >> q;
  for (int i = 0; i < k; ++i) {
    int a, b;
    cin >> a >> b;
    --a, --b;
    adj[0][a].push_back(b), adj[1][b].push_back(a);
  }
  for (int i = 0; i < q; ++i) {
    cin >> qr[i].l1 >> qr[i].l2 >> qr[i].r1 >> qr[i].r2;
    --qr[i].l1, --qr[i].l2;
    --qr[i].r1, --qr[i].r2;
    qr[i].id = i;
  }
  sort(qr, qr + q, cmp1);
  int p = 0;
  memset(seg, -1, sizeof seg);
  for (int i = 0; i < q; ++i) {
    while (p <= qr[i].r1) {
      for (auto x : adj[0][p]) upd(1, 0, m, x, p);
      ++p;
    }
    if (get(1, 0, m, qr[i].l2, qr[i].r2 + 1) >= qr[i].l1) ans[qr[i].id] = true;
  }
  p = 0;
  memset(seg, -1, sizeof seg);
  sort(qr, qr + q, cmp2);
  for (int i = 0; i < q; ++i) {
    while (p <= qr[i].r2) {
      for (auto x : adj[1][p]) upd(1, 0, n, x, p);
      ++p;
    }
    if (get(1, 0, n, qr[i].l1, qr[i].r1 + 1) >= qr[i].l2) ans[qr[i].id] = true;
  }
  for (int i = 0; i < q; ++i) cout << (ans[i] ? "YES\n" : "NO\n");
  return 0;
}
