#include <bits/stdc++.h>
using namespace std;
const int maxn = 200010, inf = 0x3f3f3f3f;
vector<int> a[3], f[3];
int st, ed, v, n, m;
int calc(int t, int x) {
  int y = lower_bound(a[t].begin(), a[t].end(), x) - a[t].begin();
  return f[t][y] + max(0, a[t][y] - x - v);
}
int main() {
  scanf("%d%d%d%d", &ed, &v, &n, &m);
  for (int i = 0; i < 3; ++i) a[i].clear(), a[i].push_back(ed);
  for (int i = 1, x, y; i <= n; ++i) {
    scanf("%d%d", &x, &y), --x;
    if (y >= ed) continue;
    for (int j = x; j >= 0; --j) a[j].push_back(y);
  }
  for (int i = 0; i < 3; ++i) {
    sort(a[i].begin(), a[i].end());
    f[i].resize(a[i].size());
  }
  for (int k = 0; k < 3; ++k) {
    f[k].back() = 0;
    for (int i = a[k].size() - 2; i >= 0; --i)
      f[k][i] = f[k][i + 1] + max(0, a[k][i + 1] - a[k][i] - v);
  }
  for (int i = 1, d0, d1, d2; i <= m; ++i) {
    scanf("%d", &st);
    d0 = calc(0, st), d1 = calc(1, st), d2 = calc(2, st);
    if (d0 > 0)
      puts("-1 -1");
    else
      printf("%d %d\n", d1, d2 - d1);
  }
  return 0;
}
