#include <bits/stdc++.h>
#ifndef Local
#define debug(...) 1337
#define endl '\n'
#endif

using namespace std;

#define int long long

typedef long long ll;
typedef long double ld;

#define all(x) (x).begin(), (x).end()
#define sz(x) (int)(x).size()

template <typename T, typename U>
bool smin(T& a, U b) {
	if (a > b) {
		a = b;
		return true;
	}
	return false;
}

template <typename T, typename U>
bool smax(T& a, U b) {
	if (a < b) {
		a = b;
		return true;
	}
	return false;
}

const ld eps = 1e-11;

ld mult(ld a, ld b) {
	ld c = a * b;
	return c;
}

ld bpow(ld x, int k) {
	ld r = 1;
	while (k) {
		if (k & 1)
			r = mult(r, x);
		x = mult(x, x);
		k >>= 1;
	}
	return r;
}

void solve() {
	int n, m;
	cin >> n >> m;
	ld r;
	cin >> r;
	vector<tuple<int, int, int>> v(n + m);
	for (int i = 0; i < n; ++i) {
		auto& [d, w, t] = v[i];
		cin >> d >> w;
		t = 0;
	}
	vector<int> qs(m);
	for (int i = n; i < n + m; ++i) {
		auto& [d, w, t] = v[i];
		cin >> d;
		w = 1e10;
		t = 1;
		qs[i - n] = d;
	}
	v.push_back({0, 0, 0});
	sort(all(v));
	map<int, ld> ans;

	ld c = 0;
	for (int i = 1; i <= n + m; ++i) {
		auto [d, w, t] = v[i];
		auto [dp, wp, tp] = v[i - 1];
		c = mult(c, bpow(1 - r, d - dp));
		if (t)
			ans[d] = c;
		else
			c += mult(w, r);
	}

	for (int& i : qs)
		cout << ans[i] << ' ';
	cout << endl;
}

signed main() {
	ios::sync_with_stdio(false), cin.tie(nullptr);
	cout.precision(9);
	fixed(cout);

	int tt = 1;
	// cin >> tt;
	while (tt--)
		solve();

	return 0;
}
