#include <bits/stdc++.h>
using namespace std;
const int maxn = 100020;
const int maxx = 10000;
const int MOd = 1e9 + 7;
const int K = 750;
int a, b, c, q, n;
vector<pair<int, int> > segment[maxn * 3], segment2[maxn * 3];
vector<int> w[maxn], w2[maxn];
int main() {
  scanf("%d %d %d %d", &a, &b, &c, &q);
  n = 1 << 17;
  for (int i = 1, j, k; i <= c; i++) {
    scanf("%d %d", &j, &k);
    w[j].push_back(k);
    w2[k].push_back(j);
  }
  for (int i = 1; i <= a; i++) {
    int k = b + 1;
    sort(w[i].begin(), w[i].end());
    for (int j = w[i].size() - 1; j >= 0; j--) {
      segment[i + n - 1].push_back(pair<int, int>(w[i][j], k));
      k = w[i][j];
    }
    segment[i + n - 1].push_back(pair<int, int>(0, k));
  }
  for (int i = 1; i <= b; i++) {
    int k = a + 1;
    sort(w2[i].begin(), w2[i].end());
    for (int j = w2[i].size() - 1; j >= 0; j--) {
      segment2[i + n - 1].push_back(pair<int, int>(w2[i][j], k));
      k = w2[i][j];
    }
    segment2[i + n - 1].push_back(pair<int, int>(0, k));
  }
  for (int k = n - 1; k >= 1; k--) {
    for (int j = 0; j < segment[k + k].size(); j++)
      segment[k].push_back(segment[k + k][j]);
    for (int j = 0; j < segment[k + k + 1].size(); j++)
      segment[k].push_back(segment[k + k + 1][j]);
    for (int j = 0; j < segment2[k + k].size(); j++)
      segment2[k].push_back(segment2[k + k][j]);
    for (int j = 0; j < segment2[k + k + 1].size(); j++)
      segment2[k].push_back(segment2[k + k + 1][j]);
  }
  for (int k = n + n - 1; k >= 1; k--) {
    sort(segment[k].begin(), segment[k].end());
    int t = 0;
    for (int i = 0; i < segment[k].size(); i++) {
      t = max(t, (segment[k][i].second));
      segment[k][i].second = t;
    }
    sort(segment2[k].begin(), segment2[k].end());
    t = 0;
    for (int i = 0; i < segment2[k].size(); i++) {
      t = max(t, (segment2[k][i].second));
      segment2[k][i].second = t;
    }
  }
  while (q--) {
    int x1, x2, asseopirwjaelkf, asrwjaelkf;
    scanf("%d %d %d %d", &x1, &asseopirwjaelkf, &x2, &asrwjaelkf);
    int h = 1, ans = 0;
    for (int l = x1 + n - 1, r = x2 + n - 1; l <= r;
         l = (l + 1) >> 1, r = (r - 1) >> 1) {
      if (l & 1) {
        int t = lower_bound(segment[l].begin(), segment[l].end(),
                            pair<int, int>(asseopirwjaelkf, 0)) -
                segment[l].begin();
        t--;
        if (t >= 0 && segment[l][t].second > asrwjaelkf) h = 0;
      }
      if (~r & 1) {
        int t = lower_bound(segment[r].begin(), segment[r].end(),
                            pair<int, int>(asseopirwjaelkf, 0)) -
                segment[r].begin();
        t--;
        if (t >= 0 && segment[r][t].second > asrwjaelkf) h = 0;
      }
    }
    if (h) {
      printf("YES\n");
      continue;
    }
    h = 1;
    for (int l = asseopirwjaelkf + n - 1, r = asrwjaelkf + n - 1; l <= r;
         l = (l + 1) >> 1, r = (r - 1) >> 1) {
      if (l & 1) {
        int t = lower_bound(segment2[l].begin(), segment2[l].end(),
                            pair<int, int>(x1, 0)) -
                segment2[l].begin();
        t--;
        if (t >= 0 && segment2[l][t].second > x2) h = 0;
      }
      if (~r & 1) {
        int t = lower_bound(segment2[r].begin(), segment2[r].end(),
                            pair<int, int>(x1, 0)) -
                segment2[r].begin();
        t--;
        if (t >= 0 && segment2[r][t].second > x2) h = 0;
      }
    }
    if (h) {
      printf("YES\n");
      continue;
    }
    printf("NO\n");
  }
  return 0;
}
