#include <bits/stdc++.h>
using namespace std;
map<long long, long long> mp;
map<long long, map<long long, long long> > dp;
set<long long> se;
vector<long long> v;
int main() {
  long long e, s, n, m;
  cin >> e >> s >> n >> m;
  se.insert(e);
  for (int i = 0; i < n; i++) {
    long long a, b;
    scanf("%lld %lld", &a, &b);
    mp[b] = a;
    se.insert(b);
  }
  for (int j = 0; j < m; j++) {
    long long a;
    scanf("%lld", &a);
    se.insert(a);
    v.push_back(a);
  }
  set<long long>::iterator it, it1;
  it = se.lower_bound(e);
  dp[*it][0] = dp[*it][1] = 0;
  it++;
  long long a[5] = {0};
  a[3] = s;
  long long pre = e, ff = 1;
  for (; it != se.end(); it++) {
    int id = *it;
    if (ff == 0) {
      dp[id][0] = dp[id][1] = -1;
      continue;
    }
    long long dis = id - pre, hx = 3;
    while (dis > 0 && hx > 0 && a[hx]) {
      if (a[hx] >= dis) {
        if (hx != 3) {
          dp[id][hx - 1] += dis;
        }
        dis = 0;
      } else {
        dis -= a[hx];
        if (hx != 3) {
          dp[id][hx - 1] += a[hx];
        }
        a[hx] = 0;
      }
      hx--;
    }
    if (dis > 0) {
      ff = 0;
    }
    if (ff == 0) {
      dp[id][0] = dp[id][1] = -1;
      continue;
    }
    dp[id][0] += dp[pre][0];
    dp[id][1] += dp[pre][1];
    long long xx = s, cc = mp[id];
    if (cc == 0) continue;
    for (int i = 3; i >= 1; i--) {
      if (i > cc) {
        xx -= a[i];
      } else {
        a[i] = max(a[i], xx);
        xx -= a[i];
      }
    }
    pre = id;
  }
  a[1] = a[2] = 0;
  a[3] = s;
  pre = e, ff = 1;
  it = se.lower_bound(e);
  it1 = se.begin();
  it1--;
  for (it--; it != it1; it--) {
    int id = *it;
    if (ff == 0) {
      dp[id][0] = dp[id][1] = -1;
      continue;
    }
    long long dis = pre - id, hx = 3;
    while (dis > 0 && hx > 0) {
      if (a[hx] >= dis) {
        if (hx != 3) {
          dp[id][hx - 1] += dis;
        }
        a[hx] -= dis;
        dis = 0;
      } else {
        dis -= a[hx];
        if (hx != 3) {
          dp[id][hx - 1] += a[hx];
        }
        a[hx] = 0;
      }
      hx--;
    }
    if (dis > 0) {
      ff = 0;
    }
    if (ff == 0) {
      dp[id][0] = dp[id][1] = -1;
      continue;
    }
    dp[id][0] += dp[pre][0];
    dp[id][1] += dp[pre][1];
    long long xx = s, cc = mp[id];
    pre = id;
    if (cc == 0) continue;
    for (int i = 3; i >= 1; i--) {
      if (i > cc) {
        xx -= a[i];
      } else {
        a[i] = xx;
        xx -= a[i];
      }
    }
  }
  int len = v.size();
  for (int i = 0; i < len; i++) {
    printf("%lld %lld\n", dp[v[i]][0], dp[v[i]][1]);
  }
}
