#include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
const int N = 2e5;
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define int long long


long double binpow(long double a, int n){
	if(n == 0) return 1.0;
	if(n%2 == 0){
		long double b = binpow(a, n / 2);
		return b*b;
	}
	return (a * binpow(a, n -1));
}

main(){
	int n, q; cin >> n >> q;
	long double r; cin >> r;
	long double r1 = 1.000-r;
	vector< pair<int, int> > a(n);
	map<int, long double> W, ans;
	for(int i = 0;i < n; i++){
		cin >> a[i].ff >> a[i].ss;
		W[a[i].ff] = a[i].ss;
	}
	sort(all(a));

	set<int> days;
	ans[0] = 0;
	days.insert(0);
	
	for(auto [day, w] : a){
		int bc = *days.rbegin();
		int pw = day - bc;
		long double x = ans[bc];
		x*= binpow(r1, pw);
		x+= r*w;
		ans[day] = x;
		days.insert(day);
	}
	cout << fixed << setprecision(6);
	vector<int> need(q);
	for(int i = 0;i < q; i++){
		cin >> need[i];
		auto it = days.upper_bound(need[i]);
		it--;
		int pw = need[i] - *it;
		long double x = ans[*it];
		x*= binpow(r1, pw);
		cout << x << ' ';

	
	}
	return 0;
}
