#include <bits/stdc++.h>
using namespace std;
 
#define ll long long
#define int long long
#define pb push_back
#define all(x) x.begin(), x.end()
 
const int maxn = 2e5 + 5;
const int mod = 1e9 + 7;

double d[maxn], w[maxn];
int q[maxn];
map <double, double> a;
int n, m, last = 0;
double r, cnt = 0;
pair <int, int> p[maxn];
map <int, int> check;

double binpow (double a, int n) {
  if (n == 0)
    return 1;
  if (n % 2 == 1)
    return binpow (a, n-1) * a;  
  else {
    int b = binpow (a, n/2);
    return b * b;
  }
}

int find(int day){
  int l = 1, r = n;
  int ans = 0;
  while (l <= r){
    int mid = (l + r) / 2;
    if (p[mid].first <= day){
      l = mid + 1;
      ans = mid;
    }
    else r = mid - 1;
  }
  return ans;
}
 
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0); cout.tie(0);

  cin >> n >> m >> r;
  for (int i = 1; i <= n; i++){
    cin >> d[i] >> w[i];
    p[i] = {d[i], w[i]};
  }
  sort (p + 1, p + 1 + n);
  for (int i = 1; i <= n; i++){
    int D = p[i].first;
    int W = p[i].second;
    check[D]++;
    if (D - last > 1){
      int x = D - last - 1;
      int plus = 1;
      //cout << cnt << ' ' << i << '\n';
      cnt *= (binpow(1 - r, x));
      //if (i == 2) cout << cnt << '\n';
    } 
    cnt += (W * r);
    last = D;
    a[last] = cnt;
    cnt = cnt * (1 - r);
  }
  int mx = 0;
  for (int i = 1; i <= m; i++) cin >> q[i], mx = max(mx, q[i]);
  for (int i = 1; i <= m; i++){
    if (check[q[i]] == 0){
      int x = find(q[i]);
      x = p[x].first; 
      a[q[i]] = a[x] * (binpow(1 - r, q[i] - x));
    }
    cout << fixed << a[q[i]] << ' ';
  }
}