#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using ld = long double;
using ull = unsigned long long;
using vi = vector<ll>;
using vvi = vector<vi>;
using pi = pair<ll, ll>;
using vpi = vector<pi>;
const ll inf = 998244353;
#define all(a) a.begin(), a.end()

ld binpow(ld a, int b) {
	ld cur = a, res = 1;
	if(b<= 0){
        return 1;
	}
	while (b) {
		if (b % 2) {
			res *= cur;
			b--;
		}else{
            cur *= cur;
            b /= 2;
		}
	}
	return res;
}

int main() {

    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.precision(12);

	int n, m;
	ld r;
	cin >> n >> m >> r;
	vector<pair<int, ld>> d;
	int t;
	ld x;
	map<int,int> f;
	for (int i = 0; i < n; ++i) {
		cin >> t >> x;
		f[t] = 1;
		d.push_back({ t, x * r });
	}
	sort(all(d));
	vector<pair<int, ld>> a = {d[0]};
	for (int i = 1; i < n; ++i) {
		int tm = d[i - 1].first;
		ld lst = a[i - 1].second * binpow((1 - r), d[i].first - tm);
		lst = lst + d[i].second;
		a.push_back({d[i].first, lst});
	}



	a.insert(a.begin(), {0, 0});

    for(int i =0;i<m;++i){
        int g;
        cin >> g;
        int l = 0, ri = n + 1;
        while(ri -l > 1){
            int m = (ri+l)/2;
            if(a[m].first < g){
                l = m;
            }else{
                ri = m;
            }
        }
        if(f[g]){
            cout << a[l+1].second << " ";
        }else{
            cout << a[l].second * binpow((1 - r), g - a[l].first) << " ";
        }
    }
}
