#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using ll = long long;
using vll = vector<ll>;
using pll = pair<ll, ll>;
using ld = long double;
using ull = unsigned long long;
#define pb  push_back
#define pf  push_front
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define x first
#define y second
const ll mod = 1e9 + 7;
const int N = 1e5;
const ll INF = 1e18;

ld binpow(ld a, ll n){
	ld b = 1;
	while (n != 0) {
        if (n % 2 == 1){
            b = b * a;
        }
        a = a * a;
        n /= 2;
    }
    return b;
}

int main(){
	cin.tie(0);
	ios_base::sync_with_stdio(0);
	cout << fixed << setprecision(8);
	ll n, q; cin >> n >> q;
	ld r; cin >> r;
	vector<pll> d(n+1);
	d[0] = {0, 0};
	for(int i = 1; i <= n; i++){
		ll di, wi; cin >> di >> wi;
		d[i] = {di, wi};
	}
	sort(all(d));
	set<pair<ll, ld>> prev;
	prev.insert({0, 0});
	for(int i = 1; i <= n; i++){
		auto it = prev.end();
		it--;
		ll di = (*(it)).first;
		ld x =  (*(it)).second;
		ll dj = d[i].first; 
		ll w = d[i].second;
		ld x1 = x * binpow((1-r), dj - di);
		x1 += w*r;
		prev.insert({dj, x1});
	}
	while(q--){
		ll x; cin >> x;
		auto it = prev.lower_bound({x, 1e9});
		if(it == prev.end() || (*(it)).first > x){
			if(it != prev.begin()){
				it--;
			}
		}
		ll di = (*(it)).first;
		ld z =  (*(it)).second;
		cout << z * binpow((1-r), x - di) << ' ';
	}
	return 0;
}