#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<algorithm>
#include<cmath>
#include<vector>
#include<string>
#include<set>
#include<map>
#include<iomanip>
#include<bitset>
#include<unordered_set>
#include<unordered_map>
#include<queue>
#include<stack>
#include<deque>
using namespace std;
#define int long long
#define ld long double
#define all(x) x.begin(), x.end()
ld eps = 1e-10;
bool ls(ld a, ld b) {
	return b - a > eps;
}

bool eq(ld a, ld b) {
	return !ls(a, b) && !ls(b, a);
}

bool cmp(pair<int, int> a, pair<int, int> b) {
	if (a.first == b.first)
		return !ls(a.second, b.second);
	return a.first < b.first;
}

ld bin_pow(ld a, int n) {
	if (n == 0) return 1;
	if (n % 2 == 0) {
		ld tmp = bin_pow(a, n / 2);
		return tmp * tmp;
	}
	return a * bin_pow(a, n - 1);
}

void solve() {
	cout << fixed << setprecision(10);
	int n, m;
	cin >> n >> m;
	ld r;
	cin >> r;
	vector<int> tmp(m);
	map<int, ld> ans;
	vector<pair<int, ld>> d(n + m);
	for (int i = 0; i < n; ++i) {
		cin >> d[i].first >> d[i].second;
	}
	for (int i = 0; i < m; ++i) {
		cin >> d[n + i].first;
		tmp[i] = d[n + i].first;
		d[n + i].second = 0;
	}
	sort(all(d), cmp);
	int last_d = 0;
	ld last_w = 0;
	
	for (int i = 0; i < n+m; ++i) {
		if (!eq(d[i].second, 0)) {
			last_w = last_w * bin_pow(1 - r, d[i].first - last_d) + d[i].second * r;
			last_d = d[i].first;
		}
		else {
			ans[d[i].first] = last_w*bin_pow(1 - r, d[i].first - last_d);
		}
	}
	for (auto to : tmp) {
		cout << ans[to] << ' ';
	}
}

signed main() {
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	int t = 1;
	// cin >> t;
	while (t--) {
		solve();
	}
}