#include <bits/stdc++.h>
using namespace std;
int N, M, C, Q, x, y;
int xa[200100], xb[200100], ya[200100], yb[200100];
vector<int> H[200100], V[200100];
vector<pair<int, int> > tree[200100 * 4];
vector<pair<int, int> >::iterator it;
int b[200100 * 4], e[200100 * 4];
bool ok[200100];
void print(vector<pair<int, int> >::iterator x) {
  cout << x->first << " " << x->second << endl;
}
void init(int n, int beg, int end, vector<int> *A) {
  b[n] = beg;
  e[n] = end;
  tree[n].clear();
  if (beg == end) {
    if (A[beg].empty())
      tree[n].push_back(pair<int, int>(0, max(N, M) + 1));
    else {
      int last = 0;
      for (__typeof((A[beg]).begin()) it = (A[beg]).begin();
           it != (A[beg]).end(); it++)
        tree[n].push_back(pair<int, int>(last, *it)), last = *it;
      tree[n].push_back(pair<int, int>(last, max(N, M) + 1));
    }
    return;
  }
  int m = beg + (end - beg) / 2;
  init(2 * n, beg, m, A);
  init(2 * n + 1, m + 1, end, A);
  vector<pair<int, int> > tmp;
  merge((tree[2 * n]).begin(), (tree[2 * n]).end(), (tree[2 * n + 1]).begin(),
        (tree[2 * n + 1]).end(), back_inserter(tmp));
  int hi = -1;
  for (__typeof((tmp).begin()) it = (tmp).begin(); it != (tmp).end(); it++)
    if (it->second > hi) {
      if (!tree[n].empty() && tree[n].back().first == it->first)
        tree[n].pop_back();
      hi = it->second, tree[n].push_back(*it);
    }
}
int query(int n, int l, int r, int a, int c) {
  if (b[n] > r || e[n] < l) return true;
  if (b[n] >= l && e[n] <= r) {
    it = lower_bound((tree[n]).begin(), (tree[n]).end(), pair<int, int>(a, -1));
    if (it == tree[n].begin()) return true;
    it--;
    return it->second <= c;
  }
  return query(2 * n, l, r, a, c) && query(2 * n + 1, l, r, a, c);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> N >> M >> C >> Q;
  for (int I = 1; I <= C; I++) {
    cin >> x >> y;
    H[x].push_back(y);
    V[y].push_back(x);
  }
  for (int I = 1; I <= N; I++) sort((H[I]).begin(), (H[I]).end());
  for (int I = 1; I <= M; I++) sort((V[I]).begin(), (V[I]).end());
  for (int q = 1; q <= Q; q++) cin >> xa[q] >> ya[q] >> xb[q] >> yb[q];
  init(1, 1, N, H);
  for (int q = 1; q <= Q; q++) {
    ok[q] |= query(1, xa[q], xb[q], ya[q], yb[q]);
  }
  init(1, 1, M, V);
  for (int q = 1; q <= Q; q++) {
    ok[q] |= query(1, ya[q], yb[q], xa[q], xb[q]);
  }
  for (int q = 1; q <= Q; q++)
    if (ok[q])
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
}
