#include <bits/stdc++.h>
#define int long long
#define ff first
#define ss second
#define pb push_back
#define yes cout<<"YES\n"
#define no cout<<"NO\n"
#define no1 cout<<"-1\n"

using namespace std;

const int N = 1e5+100;
const int INF = 1e18;
const int mod = 1e9+7;

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

// bool check(int x){
//     while(x%2 == 0){
//         x/=2;
//     }
//     if(x==1) return 1;
//     return 0;
// }

// int rec(int a, int b, int lay){
//     if(a == 0 || b == 0) return 0;
//     int x = 1;
//     int y = 1;
//     int cnt = 0;
//     while(x*2<=a && y*2<=b){
//         x*=2;
//         y*=2;
//         cnt++;
//     }
//     int l = lay;
//     if(b-y == 0) l--;
//     if(a-x == 0) l--;
//     cout<<a<<' '<<b<<'\n'<<x<<' '<<y<<' '<<(cnt*2+1)*(x*y)<<'\n'<<'\n';
//     return rec(a,b-y,lay+1)+rec(a-x,b,lay+1)+rec(a-x,b-y,lay+1)+(cnt*2+1)*(x*y)+(x*y)*l;
// }

int n,m;
long double r;
int  q[N];
pair<long double, long double> d[N];
vector<pair<int,long double>> ans;

void solve(){
    cin>>n>>m>>r;
    for(int i = 1;i<=n;i++){
        int x,y;
        cin>>x>>y;
        d[i] = {x,y};
    }
    sort(d+1,d+1+n);
    for(int i = 1;i<=m;i++){
        cin>>q[i];
    }
    ans.pb({0,0});
    for(int i = 1;i<=n;i++){
        long double x = ans.back().ss * binpow((1-r),(d[i].ff - ans.back().ff-1));
        ans.pb({d[i].ff,(1-r)*x+r*d[i].ss});
    }
    cout<<fixed;
    cout<<setprecision(7);
    for(int i = 1;i<=m;i++){
        int l = 0;
        int r1 = n+1;
        while(r1>l+1){
            int mid = (r1+l)/2;
            if(ans[mid].ff <= q[i]) l = mid;
            else r1 = mid;
        }
        int dis = ans[l].ff;
        long double x = ans[l].ss;
        if(q[i] == dis){
            cout<<x<<' ';
        }
        else{
            long double y = x * binpow( (1-r) , (q[i] - dis - 1) );
            cout<<y * (1-r)<<' ';   
        }
    }
}       



signed main(){
    ios_base::sync_with_stdio(0);
    cin.tie(nullptr);
    // cout.tie(nullptr);
    int t = 1; 
    // cin>>t;
    // cout<<"";
    for(int i = 1;i<=t;i++){
        solve();
    }
}