#include <bits/stdc++.h>

#pragma GCC optimize("Ofast")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,popcnt,abm,mmx,tune=native")
#pragma GCC optimize("fast-math")
#pragma GCC optimize ("unroll-loops,Ofast,O3")
#pragma GCC target("avx,avx2,fma")

#define file(s) freopen(s".in", "r", stdin), freopen(s".out", "w", stdout)
#define deb(x) cerr << #x  << " = " << x << endl;
#define all(x) (x).begin(),(x).end()
#define int long long
#define ar array
#define rs(p) (p<<1|1)
#define ls(p) (p<<1)
#define pb push_back
#define endl '\n'
#define sz size()
#define F first
#define S second
#define IOIG ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;
const long double eps = 1e-10;
const int MIN = LLONG_MIN;
const int M = 1e9 + 7;
const int N = 2e5 + 23;
void solve() {
  int n, k;
  double r;
  cin >> n >> k >> r;
  pair <int ,int> p[n + 3];
  vector < int > v;
  for(int i = 1; i <= n; ++i) {
    cin >> p[i].F >> p[i].S;
    v.pb(p[i].F);
  }
  sort(p + 1, p + 1 + n);
  p[0] = {0, 0};
  map <double, double> ans;
  for(int i = 1; i <= n; ++i) {
    if(p[i - 1].F + 1 == p[i].F) {
      ans[p[i].F] = (ans[p[i - 1].F] * (1.000000 - r)) + (p[i].S * r);
    } else {
      ans[p[i].F] = ans[p[i - 1].F] * (double)(pow(1.0000000 - r, p[i].F - p[i - 1].F));
      ans[p[i].F] += (p[i].S * r);
    }
  }
  v.pb(0);
  sort(all(v));
  ans[p[n].F + 1] = (ans[p[n].F] * (1.000000 - r));
  for(int i = 1; i <= k; ++i) {
    int x;
    cin >> x;
    if(ans[x] == 0) {
      int res = upper_bound(all(v) , x) - v.begin();
      cout << fixed << setprecision(6) << ans[v[res - 1]] * (double)(pow(1.0000000 - r, x - v[res - 1])) << ' ';
    } else {
      cout.precision(6);
      cout << fixed << setprecision(6) << ans[x] << ' ';  
    }
  }
}
signed main () {
  IOIG
  int test = 1;
  // cin >> test;
    while(test--) {
      solve();
  }
}
