#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define ld long double

const ll N = 1e8 + 7;

ld n, m;
ld r;
map<ll, ld> d;
vector<pair<ld, ld> > a;
vector<ld> toFind, days;

ld bin_pow(ld x, ll y) {
    if (y == 0) return 1;
    if (y % 2 == 1)
        return x * bin_pow(x, y - 1);
    ld c = bin_pow(x, y / 2);
    return c * c;
}

void solve() {

	cin >> n >> m;
//	a.resize(n);

	cin >> r;

	for(int i = 0; i < n; i++){
		ll day, w;
		cin >> day >> w;
		a.push_back(make_pair(day, w));
		days.push_back(day);
	}



	for(int i = 0; i < m; i++){
		ld day; cin >> day;
		a.push_back(make_pair(day, 0));
		toFind.push_back(day);
		days.push_back(day);
	}

	days.push_back(0);

	sort(a.begin(), a.end());
	sort(days.begin(), days.end());

	for(int i = 1; i < a.size(); i++){
		int day = a[i].first;
		ld w = a[i].second;
		int prev_day_ind = lower_bound(days.begin(), days.end(), day) - days.begin() - 1;
		int day_prev = days[prev_day_ind];

		d[day] = bin_pow(1 - r, day - day_prev) * d[day_prev] + r * w;
	}

	for(int i = 0; i < toFind.size(); i++){
		int day = toFind[i];
        cout << fixed << setprecision(9) << d[day] << ' ';
	}
}

int main() {
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

	int T = 1;
//	cin >> T;
	while (T--) {
		solve();
	}
	return 0;
}

