#include <iostream>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <algorithm>
#include <cmath>

using namespace std;
using ll = long long;

int main()
{
	cin.tie(0); cout.tie(0);
	cout.precision(7); cin.precision(7);
	ll n, m; cin >> n >> m;
	double k; cin >> k;
	double q;
	ll p;
	if (k == 0) {
		for (ll i = 0; i < m; i++) {
			cout << 0 << ' ';
		}
		return 0;
	}
	vector <double> a(99999999);
	for (ll i = 0; i < n; i++) {
		cin >> p >> q;
		a[p] = q;
	}
	ll mx = -228;
	vector <ll> c;
	for (ll i = 0; i < m; i++) {
		cin >> p;
		mx = max(mx, p);
		c.push_back(p);
	}
	vector <pair <double, double>> b(mx+1);
	for (ll i = 1; i <= mx; i++) {
		b[i].first = b[i - 1].second * double(1 - k);
		b[i].second = b[i].first + a[i] * double(k);
	}
	for (ll i = 0; i < c.size(); i++) {
		cout << b[c[i]].second<<' ';
	}
}