#include<iostream>
#include<vector>
#include<map>
#include<set>
#include<algorithm>
#include<iomanip>
using namespace std;
using ll = long long;
using db = double;

bool cmp(pair<int, int>a, pair<int, int>b) {
	return a.first > b.first || a.first == b.first && a.second < b.second;
}
db bin_pow(db a, int n) {
	if (n == 0)return 1.0;
	if (n % 2 == 0)return bin_pow(a * a, n / 2);
	return bin_pow(a, n - 1) * a;
}
void solve()
{
	cout.precision(18);
	int n, m; cin >> n >> m;
	db r; cin >> r;
	vector<pair<int, int>>days(n);
	for (int i = 0; i < n; ++i)cin >> days[i].first >> days[i].second;
	sort(days.begin(), days.end());
	vector<int>used_days = { 0 };
	map<int, db>sts;
	sts[0] = 0.0;
	for (int i = 0; i < n; ++i) {
		auto [d, w] = days[i];
		int prev = lower_bound(used_days.begin(), used_days.end(), d) - used_days.begin() - 1;
		sts[d] = sts[used_days[prev]] * bin_pow((1.0 - r), d - used_days[prev]) + r * w;
		used_days.push_back(d);
	}
	while (m--) {
		int d; cin >> d;
		int prev = upper_bound(used_days.begin(), used_days.end(), d) - used_days.begin() - 1;
		cout <<fixed<< sts[used_days[prev]] * bin_pow((1.0 - r), d - used_days[prev]) << " ";
	}

}

int main()
{
	cin.tie(0)->sync_with_stdio(0);
	cout.tie(0)->sync_with_stdio(0);
	int t = 1;
	//cin>>t;
	while (t--) {
		solve();
	}
}