#include <bits/stdc++.h>

using namespace std;

int main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    int n, m;
    double r;
    cin >> n >> m >> r;
    vector<pair<int, int>> d(n), q(m);
    for (auto &[x, y]: d) cin >> x >> y;
    for (int i = 0; i < m; i++) {
        q[i].second = i;
        cin >> q[i].first;
    }
    sort(q.begin(), q.end());
    sort(d.begin(), d.end());
    int cur_d = 1, di = 0, qi = 0;
    double cur_w = 0;
    vector<double> ans(m);
    while (qi < q.size()) {
        if (di < d.size() && d[di].first <= q[qi].first) {
            cur_w = cur_w * pow((1 - r), d[di].first - cur_d) + r * (double)d[di].second;
            cur_d = d[di++].first;
        }
        else if (cur_d <= q[qi].first) {
            cur_w *= pow((1 - r), q[qi].first - cur_d);
            ans[q[qi].second] = cur_w;
            cur_d = q[qi++].first;
        }
    }
    cout << ios::fixed << setprecision(10);
    for (auto& x : ans) cout << x << " ";
}