#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
const int N = 2e5 + 10;
#define int long long
#define ll long long
#define double long double
int n,m;
double r,xx[N];
vector<pair<ll,ll>> a;
vector<ll> b;
double binpow(double x,int y){
    if(!y) return 1.0;
    if(y & 1){
        return binpow(x,y - 1) * x;
    }else{
        double o = binpow(x,y / 2);
        return o * o;
    }
}
main(){
    cin >> n >> m >> r;
    for(int i = 1;i <= n;i++){
        ll d,w;
        cin >> d >> w;
        a.push_back({d,w});
        b.push_back(d);
    }
    sort(a.begin(),a.end());
    sort(b.begin(),b.end());
    double val = 0;
    int lst = 0;
    for(int i = 0;i < (int)a.size();i++){
        int cnt = 0;
        if(!i){
            cnt = a[i].first - 1;
        }else{
            cnt = a[i].first - a[i - 1].first - 1;
        }
        val = val * binpow(1 - r,cnt);
        val = val * (1 - r) + a[i].second * 1.0 * r;
        xx[i] = val;
    }
    cout << fixed << setprecision(10);
    while(m--){
        int pos;
        cin >> pos;
        if(pos < b[0]){
            cout << 0 << ' ';
        }else{
            int it = upper_bound(b.begin(),b.end(),pos) - b.begin();
            it--;
            
            cout << xx[it] * binpow(1-r,pos - b[it]) << ' ';
        }

    }
}