#include <bits/stdc++.h>
#define ll long long
#define all(a) a.begin(), a.end()
#define F first
#define S second
#define pb push_back
#define eb emplace_back
#define ull unsigned long long
#define ld long double
#define files freopen("HelpMe.in", "r", stdin), freopen("HelpMe.out", "w", stdout)
using namespace std;
const ll mod = 1e9+7;
const ll N = 1e5 + 10;
const ll P = 337ll;
const ld EPS = 1e-9;
const ll block = 400;
vector <pair<pair <ll, ll>, bool>> q;
double ans[N];
double binpow(double x, ll step){
	if(step <= 0) return 1.0;
	double res = x;
	step--;
	while(step > 0){
		if(step % 2 == 1) res *= x;
		x *= x;
		step /= 2;
	}
	return res;
}
int main() {
	ios::sync_with_stdio(false);
  	cin.tie(NULL);
  	ll n, m;
  	double r;
  	cin >> n >> m >> r;
  	double r1 = 1.0000000 - r;
  	for(ll i = 0, a, b; i < n; i++){
  		cin >> a >> b;
  		q.pb({{a, -b}, true});
  	}
  	for(ll i = 1, x; i <= m; i++){
  		cin >> x;
  		q.pb({{x, i}, false});
  	}
  	sort(q.begin(), q.end());
  	double local = 0.0;
  	ll pred = -1LL;
  	cout << fixed << setprecision(6);
  	for(ll i = 0; i < (ll)q.size(); i++){
  		ll d = q[i].F.F, cost = q[i].F.S;
  		if(q[i].S == true) cost *= -1;
  		if(pred != -1){
  			//cout << local << " "<< binpow((1.0 - r), d - pred) << " ";
  			local = 1.0 * local * binpow(r1, d - pred);
  		}
  		if(q[i].S == true) local += 1.0 * r * cost;
  		else ans[cost] = local;
  		//cout << d << " "<< local << endl;
  		pred = d;
  	}
  	for(ll i = 1; i <= m; i++){
  		cout << ans[i] << " ";
  	}
  return 0;
}
// equal, min, max, 1, random
/*

*/
