#include <bits/stdc++.h>

using namespace std;
double pv(double a, int b){
    if (b == 0) return 1.0;
    if (b % 2) {
        return pv(a * 1., b - 1) * a * 1.;
    }
    double x = pv(a * 1., b / 2);
    return x * x;
};


int main() {
    std::cout << fixed;
    int n, m;
    cin >> n >> m;
    double r;
    cin >> r;
    vector<pair<int, int>> v;
    for (int i = 0; i < n; i++) {
        int di, wi;
        cin >> di >> wi;
        v.push_back(make_pair(di, wi));
    }
    sort(v.begin(), v.end());
    vector<double> current(1, 0.0);

    int ls = 0;
    for (const auto& pair : v) {
        int di = pair.first;
        int wi = pair.second;
        current.push_back((current.back() * pv(1. - r, di - ls)) + (1. * wi * r));
        ls = di;
    }

    vector<int> qq(m);
    for (int i = 0; i < m; i++) {
        cin >> qq[i];
    }

    for (int i = 0; i < m; i++) {
        int x = qq[i];
        int l = 0;
        int r1 = n;
        while (l + 1 < r1) {
            int md = (l + r1) / 2;
            if (v[md].first > x) {
                r1 = md;
            } else {
                l = md;
            }
        }

        if (v[l].first > x) {
            cout << "0 ";
        } else {
            int ls = v[l].first;
            if (x - ls == 0) {
                cout << fixed << setprecision(6) << (current[l + 1] - (int)current[l+1] >= 0.999999 ? int(current[l+1])+1 : current[l+1]) << " ";
            } else {
                double f = current[l + 1] * (pv(1. - r, x - ls));
                cout << fixed << setprecision(6) << (f - (int)f >= .999999 ? int(f)+1 : f) << " ";
            }
        }
    }
    cout << endl;

    return 0;
}

