#include<bits/stdc++.h>

#define ll long long
#define ld long double
#define fir first
#define sec second
#define int long long
#define pb push_back
#define mp make_pair
#define vec vector
#define all(x) x.begin(), x.end()
#define sz(x) (int)x.size()

using namespace std;

const int MAX = 2e5 + 7;

ld binpow(ld x,int y){
    if (!y)return 1;
    ld res=binpow(x,y/2);
    res *= res;
    if (y%2)res*=x;
    return res;
}

void solve1(){
    int n,m,i;
    ld r;
    cin>>n>>m>>r;
    vector<int> q0,q(m);
    map<int,ld> ans;
    vector<pair<int,ld>> dw(n);
    for (i=0;i<n;i++)
        cin>>dw[i].fir>>dw[i].sec;
    sort(all(dw));
    for (i=0;i<m;i++)
        cin>>q[i];
    q0 = q;
    sort(all(q));
    int qq=0;
    vector<pair<int,ld>> knc;
    if (dw[0].fir==0)
        knc.pb(mp(1,dw[0].sec*r));
    else
        knc.pb(mp(1,0));
    for (i=0;i<n;i++){
        if (dw[i].fir==0)continue;
        ld x=knc[knc.size()-1].sec*binpow(1-r,dw[i].fir-knc[knc.size()-1].fir)+dw[i].sec*r;
        knc.pb(mp(dw[i].fir,x));
        while (qq<m&&q[qq]<knc[knc.size()-1].fir){
            ans[q[qq]] = knc[knc.size()-2].sec*binpow(1-r,q[qq]-knc[knc.size()-2].fir);
            qq++;
        }
    }
    while (qq<m){
        ans[q[qq]] = knc[knc.size()-1].sec*binpow(1-r,q[qq]-knc[knc.size()-1].fir);
        qq++;
    }
    for (i=0;i<m;i++)
        cout<<fixed<<setprecision(10)<<ans[q0[i]]<<' ';
}

struct segm {
    int l, r;
    segm(int l, int r) : l(l), r(r) { }
    bool operator<(segm b) const {
        int l1 = r - l + 1, l2 = b.r - b.l + 1;

        return l1 < l2 || (l1 == l2 && l < b.l);
    }
};

////void solve2 () {
//    int q;
//    cin >> q;
//    set < segm > s;
//    set < int > p;
//    int x[q];
//    int kol = 0;
//    for (int i = 0; i < q; ++i) {
//        char t;
//        cin >> t;
//        if (t == '+') {
//            int x1;
//            auto [l, r] = s.begin();
//            s.erase(s.begin());
//            int md = l + r >> 1;
//
//        }
//    }
//}

int32_t main () {
    // freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    solve1();
}
