#include <bits/stdc++.h>
using namespace std;
int E, S, N, M;
set<int> POS;
map<int, int> G, P2I;
map<int, vector<int> > C;
map<int, pair<signed long long, signed long long> > gas;
map<int, signed long long> need;
pair<signed long long, signed long long> ret[202000];
vector<int> P[4];
int pre[4], last[4];
void solve() {
  int i, j, k, l, r, x, y;
  string s;
  cin >> E >> S >> N >> M;
  for (i = 0; i < N; i++) {
    cin >> r >> x;
    if (x >= E) continue;
    G[E - x] = max(G[E - x], r);
    POS.insert(E - x);
  }
  G[0] = 3;
  P[1].push_back(0);
  P[2].push_back(0);
  for (auto& r : G) {
    P2I[r.second] = P[r.second].size();
    P[r.second].push_back(r.first);
  }
  gas[0] = {0, 0};
  need[0] = 0;
  for (i = 0; i < M; i++) {
    cin >> x;
    C[E - x].push_back(i);
    POS.insert(E - x);
    ret[i] = {1LL << 40, 1LL << 40};
  }
  for (auto& r : POS) {
    for (i = 1; i <= 3; i++) {
      while (pre[i] < P[i].size() && r - P[i][pre[i]] > S) pre[i]++;
    }
    int t = G[r];
    if (t) {
      gas[r] = {1LL << 40, 1LL << 40};
      if (t == 3) {
        need[r] = 0;
        if (last[3] != P[3].size() && r - P[3][last[3]] <= S) {
          gas[r] = gas[P[3][last[3]]];
        } else if (pre[2] < P[2].size() && P[2][pre[2]] < r) {
          int left = S - (r - P[2][pre[2]]);
          gas[r] = {
              gas[P[2][pre[2]]].first,
              gas[P[2][pre[2]]].second + max(0LL, need[P[2][pre[2]]] - left)};
        } else if (pre[1] < P[1].size() && P[1][pre[1]] < r) {
          int left = S - (r - P[1][pre[1]]);
          gas[r] = {
              gas[P[1][pre[1]]].first + max(0LL, need[P[1][pre[1]]] - left),
              gas[P[1][pre[1]]].second};
        }
      } else if (t == 2) {
        if (last[3] != P[3].size() && r - P[3][last[3]] <= S) {
          gas[r] = gas[P[3][last[3]]];
          need[r] = r - P[3][last[3]];
        } else if (last[2] != P[2].size() && r - P[2][last[2]] <= S) {
          gas[r] = gas[P[2][last[2]]];
          gas[r].second += need[P[2][last[2]]];
          need[r] = r - P[2][last[2]];
        } else if (pre[1] < P[1].size() && P[1][pre[1]] < r) {
          int left = S - (r - P[1][pre[1]]);
          gas[r] = {
              gas[P[1][pre[1]]].first + max(0LL, need[P[1][pre[1]]] - left),
              gas[P[1][pre[1]]].second};
          need[r] = S;
        }
      } else if (t == 1) {
        int mi = 4;
        for (i = 3; i >= 1; i--)
          if (last[i] != -1 && (mi == 4 || P[i][last[i]] > P[mi][last[mi]]) &&
              r - P[i][last[i]] <= S)
            mi = i;
        if (mi != 4) {
          gas[r] = gas[P[mi][last[mi]]];
          if (mi == 1) gas[r].first += need[P[mi][last[mi]]];
          if (mi == 2) gas[r].second += need[P[mi][last[mi]]];
          need[r] = r - P[mi][last[mi]];
        }
      }
      last[t]++;
    }
    if (C.count(r)) {
      pair<signed long long, signed long long> tret = {1LL << 40, 1LL << 40};
      if (last[3] != P[3].size() && r - P[3][last[3]] <= S) {
        tret = gas[P[3][last[3]]];
      } else if (pre[2] < P[2].size() && P[2][pre[2]] < r) {
        int left = S - (r - P[2][pre[2]]);
        tret = {gas[P[2][pre[2]]].first,
                gas[P[2][pre[2]]].second + max(0LL, need[P[2][pre[2]]] - left)};
      } else if (pre[1] < P[1].size() && P[1][pre[1]] < r) {
        int left = S - (r - P[1][pre[1]]);
        tret = {gas[P[1][pre[1]]].first + max(0LL, need[P[1][pre[1]]] - left),
                gas[P[1][pre[1]]].second};
      }
      for (auto& r2 : C[r]) ret[r2] = tret;
    }
  }
  for (i = 0; i < M; i++) {
    if (ret[i].first >= 1LL << 40) ret[i].first = ret[i].second = -1;
    (void)printf("%d %d\n", (int)ret[i].first, (int)ret[i].second);
  }
}
int main(int argc, char** argv) {
  string s;
  int i;
  if (argc == 1) ios::sync_with_stdio(false);
  for (i = 0; i < argc - 1; i++) s += argv[i + 1], s += '\n';
  for (i = 0; i < s.size(); i++) ungetc(s[s.size() - 1 - i], stdin);
  solve();
  return 0;
}
