#include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <numeric>
#include <sstream>
#include <cassert>
#include <iomanip>
#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <fstream>
#include <unordered_map>
using namespace std;

typedef long long ll;
typedef long double ld;

#define int long long

#define all(x) x.begin(),x.end()
#define pb push_back
#define ent "\n"

const int maxn = (int)1e5 + 13;
const ll inf = (long long)1e18 + 20;
const int mod = (int)1e9 + 7;

int n,q;
double r;
double dp[maxn],dp1[maxn];
pair<int,ld>a[maxn];

ld binpow(ld a,int b){
	if(b == 0)return 1;
	if(b % 2 == 0){
		ld x = binpow(a,b / 2);
		return x * x;
	}
	else{
		ld x = binpow(x,b - 1);
		return x * a;
	}
}

void solve(){
	cin >> n >> q;
	cin >> r;
	double c = 1 - r;
	for(int i = 1 ; i <= n ; i ++){
		cin >> a[i].first >> a[i].second;
	}
	sort(a + 1,a + n + 1);
	for(int i = 1 ; i <= n ; i ++){
		if(i == 1){
			if(a[i].first == 1)continue;
			dp[i] = r * a[i].second;
			dp1[i] = dp[i] * c;
		}
		else{
			int dif = a[i].first - a[i - 1].first - 1;
			if(dif > 0){
				ld ok = binpow(c,dif) * dp1[i - 1];
				ok = ok * a[i].first * r;
				dp[i] = ok;
				dp1[i] = dp[i] * c;
			}
			else{
				dp[i] = dp1[i - 1] + a[i].second * r;
				dp1[i] = dp[i] * c;
			}
		}
	}
	for(int i = 1 ; i <= q ; i ++){
		int x;cin >> x;
		int l = 1,r = n;
		while(l <= r){
			int mid = (l + r) >> 1;
			if(a[mid].first < x){
				l = mid + 1;
			}
			else{
				r = mid - 1;
			}
		}
		if(a[l].first == x){
			cout << dp[l] << ' ';
		}
		else{
			if(x < a[1].first){
				cout << 0 << ' ';
				continue;
			}
			int dif = x - a[l - 1].first - 1;
			ld ok = binpow(c,dif) * dp1[l - 1];
			cout << ok << ' ';
		}
	}
}

signed main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int t = 1;
	//cin >> t;
	while(t --){
		solve();
	}
	return 0;
}