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

map<int, double> prob_map;
map<int, int> data_map;

void task(){
    int n, q;
    cin >> n >> q;
    double r;
    cin >> r;
    vector<int> values;
    for(int i = 0; i < n; ++i){
        int c;
        cin >> c;
        cin >> data_map[c];
        values.push_back(c);
    }
    sort(values.begin(), values.end());
    int pos = 0;
    double x = 0;
    for(int i = 0; i < values.size(); ++i){
        prob_map[values[i]] = x / (1 / pow((1 - r), values[i] - pos));
        prob_map[values[i]] += data_map[values[i]] * r;
        x = prob_map[values[i]];
        pos = values[i];
    }
    for(int i = 0; i < q; ++i){
        int t;
        cin >> t;
        if(prob_map[t] != 0){
            cout << prob_map[t] << " ";
        } else if(values[0] > t){
            cout << 0 << " ";
        } else {
            int l = 0, rr = n - 1;
            while(rr - l > 1){
                int m = (l + rr) / 2;
                if(values[m] > t){
                    rr = m;
                } else {
                    l = m;
                }
            }
            if(values[rr] <= t){
                prob_map[t] = prob_map[values[rr]] / (1 / pow((1 - r), t - values[rr]));
                cout << prob_map[t] << " ";
            } else {
                prob_map[t] = prob_map[values[l]] / (1 / pow((1 - r), t - values[l]));
                cout << prob_map[t] << " ";
            }
        }
    }
}

int main(){
    task();
    return 0;
}