#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <iomanip>
using namespace std;

int main()
{
	cout << setprecision(8);
	long long n, m;
	cin >> n >> m;
	long double r;
	cin >> r;
	vector<long long> days(n);
	vector<long long> waste(n);
	long long d;
	long double	w;
	long long x = 0;
	while (x < n) {
		cin >> d >> w;
		days[x] = d;
		waste[x] = w;
		x++;
	}
	vector<long long> check(m);
	x = 0;
	long long a;
	while (x < m) {
		cin >> a;
		check[x] = a;
		x++;
	}

	long long max = 0;
	for (int i = 0; i < m; i++) {
		if (check[i] > max) {
			max = check[i];
		}
	}

	long double allwastes = 0;

	for (int i = 1; i < max+1; i++) {
		double wastik = 0;
		for (int y = 0; y < n; y++) {
			if (days[y] == i) {
				wastik = waste[y];
				break;
			}
		}
		allwastes = ((1 - r) * allwastes) + (r * wastik);
		for (int j = 0; j < m; j++) {
			if (check[j] == i) {
				cout << allwastes << " ";
			}
		}
	}
}