#include <bits/stdc++.h>

#define ll long double

using namespace std;

ll Pow(ll a , int n){
    if(!a)
        return 0;
    if(n == 0)return 1;
    if(n % 2 == 0){
        ll x1 = Pow(a , n / 2);
        return x1 * x1;
    }
    else{
        ll x1 = Pow(a , n - 1);
        return x1 * a;
    }
}

int main() {
    ios_base::sync_with_stdio(false);cin.tie(0);
    ll n, m, r;
    cin >> n >> m >> r;
    vector < pair < ll, ll > > a(n);
    for(int i = 0; i < n; i++){
        cin >> a[i].first >> a[i].second;
    }
    map < ll, ll > d;
    set < ll > counted;
    sort(a.begin(), a.end());
    if(a[0].first == 1){
        d[1] = a[0].second * r;
        counted.insert(1);
    }
    else
        d[1] = 0;
    for(int i = 0; i < a.size(); i++){
        if(a[i].first == 1){
            continue;
        }
        auto it = counted.end();
        if(counted.size())
            it--;
        d[a[i].first] = d[*it] * Pow(1 - r, a[i].first - *it);
        d[a[i].first] += a[i].second * r;
        counted.insert(a[i].first);
    }
    cout << fixed << setprecision(6);
    while(m--){
        int q;
        cin >> q;
        auto it = lower_bound(counted.begin(), counted.end(), q);
        if(counted.find(q) == counted.end()){
            if(it != counted.begin()){
                it--;
            }
            else {
                d[q] = 0;
                cout << "0 ";
                counted.insert(q);
                continue;
            }
            d[q] = d[*it] * Pow(1 - r, q - *it);
            cout << d[q] << " ";
            counted.insert(q);

        }
        else
            cout << d[q] << " ";
    }
}


