#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000 * 1000 + 10;
int s[maxn * 4];
bool ans[maxn * 4];
vector<int> vr[maxn], vc[maxn];
vector<pair<pair<int, int>, pair<int, int> > > Qr[maxn], Qc[maxn];
inline void add(int l, int r, int id, int val, int ind) {
  if (l == r) {
    s[ind] = val;
    return;
  }
  int mid = (l + r) / 2;
  int lc = 2 * ind, rc = 2 * ind + 1;
  if (id <= mid)
    add(l, mid, id, val, lc);
  else
    add(mid + 1, r, id, val, rc);
  s[ind] = min(s[rc], s[lc]);
}
inline int get(int l, int r, int fi, int se, int ind) {
  if (l == fi && se == r) return s[ind];
  int mid = (l + r) / 2;
  if (se <= mid) return get(l, mid, fi, se, 2 * ind);
  if (fi > mid) return get(mid + 1, r, fi, se, 2 * ind + 1);
  return min(get(l, mid, fi, mid, 2 * ind),
             get(mid + 1, r, mid + 1, se, 2 * ind + 1));
}
int main() {
  ios_base::sync_with_stdio(false);
  int n, m, k, q;
  cin >> n >> m >> k >> q;
  for (int i = 1; i <= k; ++i) {
    int x, y;
    cin >> x >> y;
    vr[x].push_back(y);
    vc[y].push_back(x);
  }
  for (int i = 1; i <= q; ++i) {
    int x1, x2, y1, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    swap(x1, x2);
    swap(y1, y2);
    Qr[x1].push_back({{x2, y2}, {y1, i}});
    Qc[y1].push_back({{x2, y2}, {x1, i}});
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j < vr[i].size(); ++j) add(1, m, vr[i][j], i, 1);
    for (int j = 0; j < Qr[i].size(); ++j) {
      int mi = get(1, m, Qr[i][j].first.second, Qr[i][j].second.first, 1);
      if (mi >= Qr[i][j].first.first) ans[Qr[i][j].second.second] = true;
    }
  }
  memset(s, 0, sizeof s);
  for (int i = 1; i <= m; ++i) {
    for (int j = 0; j < vc[i].size(); ++j) add(1, n, vc[i][j], i, 1);
    for (int j = 0; j < Qc[i].size(); ++j) {
      int mi = get(1, n, Qc[i][j].first.first, Qc[i][j].second.first, 1);
      if (mi >= Qc[i][j].first.second) ans[Qc[i][j].second.second] = true;
    }
  }
  for (int i = 1; i <= q; ++i)
    if (ans[i])
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  return 0;
}
