#include <bits/stdc++.h>
using namespace std;
const int N = 200000;
int s, T[N], X[N];
vector<int> vet[4], sum[4];
int calc(int t, int x) {
  int i = lower_bound(vet[t].begin(), vet[t].end(), x) - vet[t].begin();
  return sum[t][i] + max(vet[t][i] - x - s, 0);
}
bool solve(int testNumber) {
  int n, m, e;
  if (scanf("%d %d %d %d", &e, &s, &n, &m) == EOF) return false;
  for (int i = 1; i <= 3; i++) vet[i].clear();
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &T[i], &X[i]);
    if (X[i] < e)
      for (int j = 1; j <= T[i]; j++) vet[j].push_back(X[i]);
  }
  for (int i = 1; i <= 3; i++) {
    vet[i].push_back(e);
    sort(vet[i].begin(), vet[i].end());
    sum[i].resize(vet[i].size());
    sum[i].back() = 0;
    for (int j = (int)sum[i].size() - 2; j >= 0; j--)
      sum[i][j] = sum[i][j + 1] + max(vet[i][j + 1] - vet[i][j] - s, 0);
  }
  for (int i = 0; i < m; i++) {
    int f;
    scanf("%d", &f);
    if (calc(1, f) > 0)
      puts("-1 -1");
    else {
      int x = calc(2, f), y = calc(3, f);
      printf("%d %d\n", x, y - x);
    }
  }
  return true;
}
int main() {
  for (int i = 1; solve(i); i++)
    ;
  return 0;
}
