#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define f first
#define s second  
#define int long long 
#define double long double
#define yes cout<<"YES\n"
#define no cout<<"NO\n"
#define pb push_back()
#define fast ios::sync_with_stdio(false);cin.tie(0); cout.tie(0)
int mod = 998244353;
struct abcd{
    int a;
    int b;
};
bool comp(abcd a,abcd b){
    if(a.a==b.a){
        return a.b>b.b;
    }
    return a.a<b.a;
}
const int INF = 1e18;
const int N = 1e6 + 5;
int fact(int n) {
  if(n > 1)
    return ((n%998244353) * (fact(n - 1)%998244353))%998244353;
  else
    return 1;
}
double binpow (double a, int n) {
	if (n == 0)
		return 1;
	if (n % 2 == 1)
		return binpow (a, n-1) * a;
	else {
		double b = binpow (a, n/2);
		return b * b;
	}
}
int mind[N];
void precalc() {
    for(int i=0;i<N;i++)
		mind[i] = i;
	
	for (int p = 2; p < N; p++) {
		if (mind[p] == p)
		for (int d = 2 * p; d < N; d += p)
			mind[d] = min(mind[d], p);
	}
}
map<int,int>man;
void getPrimes(int h) {
	vector<int> ps;
	while (h > 1) {
		man[mind[h]]++;
		h /= mind[h];
	}
}
vector<int>dp;
int bin_search(int n,int x){
    int l=0;
    int r=n;
    while (l <= r) {
        int m = (l+r) / 2;
        if (dp[m]==x)
            return m;
        if (dp[m]<x)
            l = m + 1;
        else
            r = m - 1;
    }
    return max(l,r)-1;
}
void solve(){
    int q,k,bo=0,n=0,m,a=1,b=0,d=0,c=1,e=0,l=1,r=n,h=10000000000,f=-1,x=0,y,z=31,len=1e10,x1,y1,sum=0;
    double db;
    cin>>n>>m>>db;
    vector<pair<int,double>>v(n);
    for(int i=0;i<n;i++){
        cin>>v[i].f>>v[i].s;
        dp.push_back(v[i].f);
    }
    sort(all(v));
    sort(all(dp));
    vector<pair<int,double>>p(n+1);
    p[0].f=0;
    p[0].s=0;
    for(int i=1;i<=n;i++){
        p[i].f=v[i-1].f;
        p[i].s+=p[i-1].s*binpow(1-db,p[i].f-p[i-1].f)+v[i-1].s*db;
    }
    for(int i=0;i<m;i++){
        cin>>q;
        l=bin_search(n,q);
        cout<<setprecision(6)<<p[l+1].s*binpow(1-db,q-p[l+1].f)<<" ";
    }
}
signed main(){
    fast;
    int q=1;
    //cin>>q;
    while (q--){
        solve();
	}
}
