#include <bits/stdc++.h>
using namespace std;
template <class T>
bool umin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool umax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
int x[200009], y[200009], x1[200009], RooK[200009], x2[200009], y2[200009];
int n, m, k, q, p[200009], s[200009 << 2];
vector<int> adj[200009], query[200009], daj[200009];
bool ans[200009][2];
void upd(int p, int v, int nd, int x, int y) {
  if (x == y) {
    s[nd] = v;
    return;
  }
  int mid = (x + y) >> 1;
  if (p <= mid)
    upd(p, v, nd << 1, x, mid);
  else
    upd(p, v, nd << 1 | 1, mid + 1, y);
  s[nd] = max(s[nd << 1], s[nd << 1 | 1]);
}
int tap(int l, int r, int nd, int x, int y) {
  if (l > y or x > r) return 0;
  if (l <= x and y <= r) return s[nd];
  int mid = (x + y) >> 1;
  int i1 = tap(l, r, nd << 1, x, mid);
  int i2 = tap(l, r, nd << 1 | 1, mid + 1, y);
  return max(i1, i2);
}
void solve(bool type) {
  if (!type) {
    for (int i = 1; i <= m; i++) upd(i, daj[i][p[i]++], 1, 1, m);
    for (int i = 1; i <= n; i++) {
      for (typeof((query[i]).begin()) it = (query[i]).begin();
           it != (query[i]).end(); it++)
        if (tap(RooK[*it], y2[*it], 1, 1, m) > x2[*it]) ans[*it][0] = true;
      for (typeof((adj[i]).begin()) it = (adj[i]).begin(); it != (adj[i]).end();
           it++)
        upd(*it, daj[*it][p[*it]++], 1, 1, m);
    }
  } else {
    for (int i = 1; i <= n; i++) upd(i, daj[i][p[i]++], 1, 1, n);
    for (int i = 1; i <= m; i++) {
      for (typeof((query[i]).begin()) it = (query[i]).begin();
           it != (query[i]).end(); it++)
        if (tap(x1[*it], x2[*it], 1, 1, n) > y2[*it]) ans[*it][1] = true;
      for (typeof((adj[i]).begin()) it = (adj[i]).begin(); it != (adj[i]).end();
           it++)
        upd(*it, daj[*it][p[*it]++], 1, 1, n);
    }
  }
}
void reset() {
  memset(s, 0, sizeof s);
  memset(p, 0, sizeof p);
  for (int i = 1; i <= n; i++) adj[i].clear(), query[i].clear();
  for (int i = 1; i <= m; i++) daj[i].clear();
  for (int i = 1; i <= k; i++) {
    adj[y[i]].push_back(x[i]);
    daj[x[i]].push_back(y[i]);
  }
  for (int i = 1; i <= n; i++) {
    sort(daj[i].begin(), daj[i].end());
    daj[i].push_back(1000000007);
  }
  for (int i = 1; i <= q; i++) query[RooK[i]].push_back(i);
}
int main() {
  scanf("%d%d%d%d", &n, &m, &k, &q);
  for (int i = 1; i <= k; i++) {
    scanf("%d%d", x + i, y + i);
    adj[x[i]].push_back(y[i]);
    daj[y[i]].push_back(x[i]);
  }
  for (int i = 1; i <= m; i++) {
    sort(daj[i].begin(), daj[i].end());
    daj[i].push_back(1000000007);
  }
  for (int i = 1; i <= q; i++) {
    scanf("%d%d%d%d", x1 + i, RooK + i, x2 + i, y2 + i);
    query[x1[i]].push_back(i);
  }
  solve(0);
  reset();
  solve(1);
  for (int i = 1; i <= q; i++) {
    if (ans[i][0] & ans[i][1])
      puts("NO");
    else
      puts("YES");
  }
  return 0;
}
