#include <bits/stdc++.h>
 
#define speed ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define file(s) if (fopen(s".in", "r")) freopen(s".in", "r", stdin), freopen(s".out", "w", stdout)
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define sz(x) (int)x.size()
#define F first
#define S second
#define int long long

const int maxn = 2e5+7;
const int inf = 1e18;
const int mod = 1e9+7;
  
using namespace std;

void solve(){
	int n, m;
	cin >> n >> m;
	cout.precision(10);
	long double r;
	cin >> r;
	pair<int, long double> p[n + 3];
	map<int, long double> ans;
	vector<pair<int, int>> v;
	for(int i = 1; i <= n; i++){
		cin >> p[i].F >> p[i].S;
		v.pb({p[i].F, p[i].S});
	}
	int q[m + 3];
	for(int i = 1; i <= m; i++){
		cin >> q[i];
		v.pb({q[i], 0});
	}
	sort(all(v));
	for(int i = 0; i < v.size(); i++){
		if(i == 0){
			ans[v[i].F] = v[i].S * r;
		}else{
			long double cur = ans[v[i - 1].F] * (pow((1.0 - r), (v[i].F - 1) - v[i - 1].F));
            ans[v[i].F] = cur * (1.0 - r) + v[i].S * r;
		}
	}
	for(int i = 1; i <= m; i++){
		cout << fixed << ans[q[i]] << ' ';
	}
}
 
signed main(){
    speed
    int test = 1;
    // cin >> test;
    while(test--){
        solve();
    }
}