#include "bits/stdc++.h"
using namespace std;
const int inf = 1e9;
//using ll = long long;
using ld = long double;

ld binpow(ld a, int b) {
    ld res = 1;
    while (b) {
        if (b & 1) res *= a;
        a *= a;
        b >>= 1;
    }
    return res;
}

int main() {
    cin.tie(0)->sync_with_stdio(false);

    int n, q;
    ld r;
    cin >> n >> q >> r;
    vector<pair<int, ld>> a(n);
    map<int, ld> pre;
    set<int, greater<>> have;
    for (auto &[x, y]: a) cin >> x >> y;
    sort(a.begin(), a.end());
    for (auto &[x, y]: a) y *= r;
    ld last = 0;
    int last_day = 1;
    for (auto [x, y]: a) {
        have.insert(x);
        last = last * binpow(1 - r, x - last_day) + y;
        last_day = x;
        pre[x] = last;
//        cout << x << fixed << setprecision(6) << ' ' << last << endl;
    }
    while (q--) {
        int d;
        cin >> d;
        auto it = have.lower_bound(d);
        if (it == have.end()) {
            cout << fixed << setprecision(6) << 0 << ' ';
            continue;
        }
        ld now = pre[*it] * binpow(1 - r, d - *it);
//        cout << '\t' << d << ' ' << *it << fixed << setprecision(6) << ' ' << now << endl;
        cout << fixed << setprecision(6) << now << ' ';
    }
}