#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200005;
struct Node {
  long long t, x;
} T[MAXN];
struct Info {
  long long a[3];
} F[MAXN];
set<pair<long long, long long> > A[3];
int N, M;
long long e, s;
bool cmp(const Node &a, const Node &b) { return a.x < b.x; }
int main() {
  scanf("%d%d%d%d", &e, &s, &N, &M);
  for (int i = 1; i <= N; i++) {
    scanf("%I64d%I64d", &T[i].t, &T[i].x);
    T[i].t--;
    if (T[i].x >= e) {
      i--, N--;
    }
  }
  T[++N].t = 2, T[N].x = e;
  sort(T + 1, T + N + 1, cmp);
  for (int i = N; i; i--) {
    if (i < N) {
      F[i].a[0] = F[i].a[1] = -(1ll << 60);
      set<pair<long long, long long> >::iterator It[3], Ix[3];
      for (int k = 0; k < 3; k++) It[k] = A[k].begin();
      for (int k = 0; k < 3; k++)
        Ix[k] = A[k].lower_bound(pair<long long, long long>(T[i].x + s + 1, 0));
      bool get = 0;
      long long cur = (1ll << 60);
      for (int k = 2; k >= T[i].t; k--)
        if (It[k] != A[k].end() && (*It[k]).first - T[i].x <= s) {
          get = 1;
          if ((*It[k]).first < cur) {
            F[i] = F[(*It[k]).second];
            F[i].a[T[i].t] += (*It[k]).first - T[i].x;
            cur = (*It[k]).first;
          }
        }
      if (!get) {
        for (int k = T[i].t - 1; k >= 0; k--)
          if (Ix[k] != A[k].begin()) {
            Ix[k]--;
            int p = (*Ix[k]).second;
            F[i] = F[p];
            F[i].a[T[p].t] -= s - (T[p].x - T[i].x);
            F[i].a[T[i].t] += s;
            break;
          }
      }
    }
    A[T[i].t].insert(pair<long long, long long>(T[i].x, i));
  }
  for (int i = 1; i <= M; i++) {
    int f;
    scanf("%d", &f);
    Info cur;
    cur.a[0] = cur.a[1] = -(1ll << 60);
    for (int k = 2; k >= 0; k--) {
      set<pair<long long, long long> >::iterator it =
          A[k].lower_bound(pair<long long, long long>(f + s + 1, 0));
      if (it == A[k].begin()) continue;
      it--;
      if ((*it).first < f) continue;
      cur = F[(*it).second];
      cur.a[k] -= s - ((*it).first - f);
      break;
    }
    if (cur.a[0] < 0) cur.a[0] = -1;
    if (cur.a[1] < 0) cur.a[1] = -1;
    printf("%I64d %I64d\n", cur.a[0], cur.a[1]);
  }
  return 0;
}
