#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);
    cout << fixed << setprecision(6);
    ll n , m , r;
    cin >> n >> m >> r;
    vector < pair < ll , ll > > a(n + 1);
    map < ll , ll > mp;
    mp[0] = 0;
    for(int i = 1;i <= n;i++){
        cin >> a[i].first >> a[i].second;
    }
    sort(a.begin() , a.end());
    for(int i = 1;i <= n;i++){
        mp[a[i].first] = a[i].second * r;
        mp[a[i].first] += mp[a[i - 1].first] * Pow(1 - r , a[i].first - a[i - 1].first);
    }
    while(m--){
        int q;
        cin >> q;
        int l = 0 , r1 = n + 1;
        while(r1 - l > 1){
            int mid = (r1 + l) / 2;
            if(a[mid].first <= q){
                l = mid;
            }
            else{
                r1 = mid;
            }
        }
        cout << mp[a[l].first] * Pow(1 - r , q - a[l].first) << endl;
    }
}


