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

    typedef long long ll;
    typedef long double ld;

ld bpow(ld x, int n) {
    if (n == 0) return 1;
    if (n % 2 == 0) {
        ld d = bpow(x, n / 2);
        return d * d;
    }
    return x * bpow(x, n - 1);
}

void solve() {
    int n, m;
    cin >> n >> m;
    ld r;
    cin >> r;
    vector<tuple<ll, ll, ll, ll>> line;
    for (int i = 0; i < n; i++) {
        ll d, w;
        cin >> d >> w;
        line.push_back({d, 0, w, -1});
    }
    for (int i = 0; i < m; i++) {
        ll q;
        cin >> q;
        line.push_back({q, 1, 0, i});
    }
    sort(line.begin(), line.end());
    int last = 0;
    ld now = 0;
    vector<ld> ans(m);
    for (auto [x, t, w, idx] : line) {
        if (t == 0) {
            now *= bpow(1 - r, x - last);
            now += w * r;
            last = x;
        } else {
            ld qnow = now;
            qnow *= bpow(1 - r, x - last);
            ans[idx] = qnow;
        }
    }
    cout << fixed << setprecision(10);
    for (auto e : ans) {
        cout << e << ' ';
    }
    cout << '\n';
}

signed main() {
    ios::sync_with_stdio(0);
    cout.tie(0);
    cin.tie(0);

    int t = 1;
    //cin >> t;

    while (t--) {
        solve();
    }
}
