#include <bits/stdc++.h>
using namespace std;
int f[3][200001];
int main() {
  ios::sync_with_stdio(false);
  vector<int> v[3];
  int e, s, n, m;
  cin >> e >> s >> n >> m;
  for (int i = 0; i < 3; i++) v[i].push_back(e);
  for (int i = 0; i < n; i++) {
    int t, p;
    cin >> t >> p;
    if (p >= e) continue;
    for (int j = 0; j < t; j++) v[j].push_back(p);
  }
  for (int i = 0; i < 3; i++) {
    sort(v[i].begin(), v[i].end());
    for (int j = v[i].size() - 2; j >= 0; j--)
      f[i][j] = f[i][j + 1] + max(0, v[i][j + 1] - v[i][j] - s);
  }
  auto calc = [s](int st, vector<int> &v, int *f) {
    int x = lower_bound(v.begin(), v.end(), st) - v.begin();
    return f[x] + max(0, v[x] - st - s);
  };
  for (int i = 0; i < m; i++) {
    int fi;
    cin >> fi;
    int ans[3];
    for (int i = 0; i < 3; i++) ans[i] = calc(fi, v[i], f[i]);
    if (ans[0] > 0)
      cout << "-1 -1" << endl;
    else
      cout << ans[1] << ' ' << ans[2] - ans[1] << endl;
  }
}
