#include <bits/stdc++.h>

#define int long long

#define vlong vector<long>
#define vint vector<int>
#define vchar vector<char>
#define vbool vector<bool>
#define vvint vector<vint>
#define vstr vector<string>
#define vstring vstr

#define CININT(n) INTCIN(n);
#define INTCIN(n) int n; cin >> n;
#define INTCINVINTCIN(a, n) INTCIN(n); vint a(n); CINV(a, n);

#define ICVK(n, k, a) 			CININT(n); CININT(k); vint a(n); CINV(a, n);
#define ICVK1(n, k, a) 			ICVK(n, k, a)
#define ICVK2(n, k, h, a) 		CININT(n); CININT(k); CININT(h); vint a(n); CINV(a, n);
#define ICVK3(n, k, h, m, a)	CININT(n); CININT(k); CININT(h); CININT(m); vint a(n); CINV(a, n);

#define CIN(n) 			cin >> n;
#define COUT(n) 		cout << n;

#define CINV(a, n) 		for (int i = 0; i < n; i++) {cin >> a[i];}
#define CINVV(a, b, n) 	for (int i = 0; i < n; i++) {cin >> a[i] >> b[i];}

#define COUTV(a, n) 	for (int i = 0; i < n; i++) {cout << a[i] << " ";}
#define COUTVV(a, b, n) 	for (int i = 0; i < n; i++) {cout << a[i] << " " << b[i] << "\n";}

#define NOSPACE(a, n) 	for (int i = 0;i < n;i++) {cout << a[i];}
#define ENDL cout << "\n";

#define SORT(a) sort(a.begin(), a.end());
#define REVERSE(a) reverse(a.begin(), a.end());
#define HAS(theset, num) ((theset.find((num)) != (theset.end())))

#define FOR(i, n) for (int i = 0; i < n; i++)
#define YES if (true) {cout << "Yes"; return;}
#define NO if (true) {cout << "No"; return;}
#define IMPOS if (true) {cout << "Impossible"; return;}

#define SP " "

#define IMPOSS IMPOS

using namespace std;


long double bpw(long double val, int pw) {
	if (pw == 2) return val*val;
	if (pw == 1) return val;
	if (pw == 0) return 1;
	if (pw % 2 == 0) {
		// divisble by 2
		// x^(y/2)^2 that is
		long double a = bpw(val, pw/2);
		return a*a;
	} else {
		long double a = bpw(val, pw/2);
		return a*a*val;
	}
}

void pre() {}

// you can do this!
const bool DO_ENDL = true;
const bool MULTI_T = false; // :skull: dont forgorr me!!
void solve() {
	int n, m;
	long double k;
	cin >> n >> m >> k;

	vector<pair<int, double long> > a(n);
	FOR(i, n) {
		int x; double long y;
		cin >> x >> y;
		a[i] = make_pair(x, y);
	}
	SORT(a);

	vector<pair<int, int> > b(m);
	FOR(i, m) {
		int x;
		cin >> x;
		b[i] = make_pair(x, i);
	}
	SORT(b);

	double long CUR = 0;
	int CUR_A = 0;
	int CUR_B = 0;

	vector<long double> ans(m);

	for (int i = 1; i <= 1e9; i++) {
		if (CUR_A != n && a[CUR_A].first == i) {
			// today's a factory day!
			CUR += a[CUR_A].second*k;
			CUR_A++;
		}
		if (CUR_B != m && b[CUR_B].first == i) {
			// today's a check day!
			ans[b[CUR_B].second] = CUR;
			CUR_B++;
		}

		if (CUR_B == m) break;
		
		int days_till_next;
		if (CUR_A == n) {
			days_till_next = b[CUR_B].first - i;
		} else {
			days_till_next = (min(a[CUR_A].first - i, b[CUR_B].first - i));
		}



		// I need (1-k)^days_till_next now
		CUR *= bpw((1-k), days_till_next);
		i += days_till_next-1;

	}
	cout << fixed << setprecision(10);
	COUTV(ans, m);
}


signed main() {
	pre();
	if (not MULTI_T)
		{solve();
		return 0;}
	
	CININT(t);
	while (t--) {
		solve();
		if (DO_ENDL)
			ENDL;
	}
}