#include <bits/stdc++.h>

using namespace std;
map<int, double> U;

double r;
double unR;

double S(unsigned int n) {
    double prev = 0;
    for (int i = 1; i <= min(n, 8u); i++) {
        auto it = U.find(n-i+1);
        int u;
        if (it == U.end()) u = 0;
        else u = it->second;
        prev += pow(unR, i-1)*u;
    }
    return r*prev;
}

int main () { cout.tie(0);
    ios::sync_with_stdio(false); cin.tie(0);
    int n, m;
    cin >> n >> m;
    cin >> r;
    unR = (double)1-r;
    while (n--) {
        int d, w;
        cin >> d >> w;
        U[d] = w;
    }
    cout.precision(8);
    vector <int> req(m);
    for (int i = 0; i < m; i++) {
        cin >> req[i];
    }
    for (auto elem : req) {
        cout << S(elem) << " ";
    }
    cout << endl;
}
