#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("sse,sse2,sse3,sse4,sse4.1,sse4.2,abm,bmi,bmi2,popcnt,lzcnt,avx,avx2,fma")
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <stack>
#include <vector>
#include <string>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <cmath>
#include <time.h>
#include <deque>
#define ll long long
using namespace std;
using loh = long long; // loh
using flag = bool;
using lohd = long double; // short (4bite) // dolik loh

bool comp1 (pair <loh, pair <loh, loh>>a1, pair <loh, pair <loh, loh>> a2) {
	if (a1.second.first > a2.second.first) {
		return false;
	}
	return true;
}

bool comp2 (pair <loh, pair <loh, loh>>a1, pair <loh, pair <loh, loh>> a2) {
	if (a1.second.second > a2.second.second) {
		return false;
	}
	return true;
}

int main () {
	ios_base::sync_with_stdio (0);
	cin.tie (0);
	cout.tie (0);
	cout.precision (9);
	loh n, m, maxd = -1;;
	cin >> n >> m;
	lohd r;
	cin >> r;
	vector <pair <loh, loh>> d(n);
	for (loh i = 0; i < n; i++) {
		cin >> d[i].first >> d[i].second;
		maxd = max (maxd, d[i].first);
	}
	sort (d.begin (), d.end ());
	lohd kolvo = 0; vector <pair <lohd, pair <loh, loh>>> queries (m);
	for (loh i = 0; i < m; i++) {
		loh x;
		cin >> x;
		queries[i] = { 0, { x, i } };
		maxd = max (maxd, x);
	}
	sort (queries.begin (), queries.end (), comp1);
	loh x = 0, x2 = 0;
	for (loh i = 1; i <= maxd; i++) {
		kolvo *= (1 - r);
		if (i == d[x2].first) {
			kolvo += r * d[x2].second;
			x2++;
			if (x2 >= n) {
				x2 = 0;
			}
		}
		if (queries[x].second.first == i) {
			queries[x].first = kolvo;
			x++;
			if (x >= m) {
				break;
			}
		}
		if (kolvo < 1e-8) {
			kolvo = 0;
			if (d[x2].first > i) {
				i = d[x2].first - 1;
			}
			else {
				break;
			}
		}
	}
	sort (queries.begin (), queries.end (), comp2);
	for (loh i = 0; i < m; i++) {
		cout << queries[i].first << " ";
	}
}