#include <bits/stdc++.h>
using std::array;
using std::pair;
using std::sort;
using std::vector;
struct Bound {
  long long x;
  int type;
  array<long long, 2> sum;
  Bound(long long x, int type) : x(x), type(type), sum({0, 0}) {}
  bool operator<(Bound const& b) const { return x < b.x; }
};
void Build(vector<Bound>& b) {
  sort(b.begin(), b.end());
  array<int, 4> count = {1, 0, 0, 0};
  int len = 0;
  for (int i = 0, j = 0; i < b.size(); i = j) {
    for (; j < b.size() && b[i].x == b[j].x; ++j) {
      count[abs(b[j].type)] += b[j].type / abs(b[j].type);
    }
    b[len].x = b[i].x;
    for (b[len].type = 3; count[b[len].type] == 0; --b[len].type) {
    }
    ++len;
  }
  b.resize(len, Bound(0, 0));
  int i = len - 2;
  for (; i >= 0 && b[i].type > 0; --i) {
    b[i].sum = b[i + 1].sum;
    if (b[i].type <= 2) {
      b[i].sum[b[i].type - 1] += b[i + 1].x - b[i].x;
    }
  }
  for (; i >= 0; --i) {
    b[i].type = 0;
    b[i].sum[0] = b[i].sum[1] = -1;
  }
}
array<long long, 2> Search(vector<Bound> const& b, long long x) {
  int lower = -1, upper = b.size() - 1;
  while (lower < upper - 1) {
    int mid = (lower + upper) / 2;
    if (b[mid].x < x)
      lower = mid;
    else
      upper = mid;
  }
  if (b[upper].x == x) return b[upper].sum;
  if (b[upper].type == 0) return {-1, -1};
  if (upper == 0 || b[upper - 1].type == 0) return {-1, -1};
  auto ret = b[upper].sum;
  if (b[upper - 1].type <= 2) {
    ret[b[upper - 1].type - 1] += b[upper].x - x;
  }
  return ret;
}
int main() {
  for (int ee, ss, n, m; ~scanf("%d %d %d %d", &ee, &ss, &n, &m);) {
    long long e = ee, s = ss;
    vector<Bound> p_bounds(1, Bound(e, 3));
    vector<Bound> n_bounds(1, Bound(-e, 3));
    for (int i = 0; i < n; ++i) {
      int t, xx;
      scanf("%d %d", &t, &xx);
      long long x = xx;
      if (x < e) {
        p_bounds.emplace_back(x, t);
      }
      if (x + s < e) {
        p_bounds.emplace_back(x + s, -t);
      }
      if (e < x) {
        n_bounds.emplace_back(-x, t);
      }
      if (e < x - s) {
        n_bounds.emplace_back(-(x - s), -t);
      }
    }
    Build(p_bounds);
    Build(n_bounds);
    while (m--) {
      int xx;
      scanf("%d", &xx);
      long long x = xx;
      if (x - s <= e && e <= x + s) {
        printf("0 0\n");
        continue;
      }
      array<long long, 2> ret(x < e ? Search(p_bounds, x + s)
                                    : Search(n_bounds, -(x - s)));
      printf("%d %d\n", static_cast<int>(ret[0]), static_cast<int>(ret[1]));
    }
  }
  return 0;
}
