#include <bits/stdc++.h>
   
#define int long long
#define ld long double

using namespace std;

ld binpow(ld x, int n) {
	if(n == 0) {
		return 1;
	} else if(n == 1) {
		return x;
	} else {
		if(n % 2) {
			return binpow(x * x, n / 2) * x;
		} else {
			return binpow(x * x, n / 2);
		}
	}
}

main() {
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int n, m;
	cin >> n >> m;
	ld k;
	cin >> k;
	pair<int, ld> a[n + 5];
	for(int i = 1; i <= n; ++i) {
		cin >> a[i].first >> a[i].second;
	}
	a[0] = {0, 0};
	sort(a + 1, a + n + 1);
	for(int i = 1;i <= n; ++i) {
		a[i].second = k * a[i].second + a[i - 1].second * binpow(1 - k, a[i].first - a[i - 1].first);
		// cout << a[i].second << "\n";
	}
	while(m --) {
		int q;
		cin >> q;
		int l = 0, r = n + 1;
		while(l < r - 1) {
			int mid = (l + r) / 2;
			if(a[mid].first <= q) {
				l = mid;
			} else {
				r = mid;
			}
		}
		cout << fixed << setprecision(7) << a[l].second * binpow(1 - k, q - a[l].first) << " ";
	}
}
