#include <iostream>
#include <vector>
#include <algorithm>
#define double long double
#define int long long
using namespace std;
double binpow(double x, int k) {
    if (k == 0) return 1;
    double e = binpow(x, k / 2);
    if (k % 2 == 0) {
        return e * e;
    } else {
        return e * e * x;
    }
}
signed main() {
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    cout.precision(12);
    cout << fixed;
    int n, m;
    cin >> n >> m;
    double r;
    cin >> r;
    vector<pair<int, int>> days(n);
    for (int i = 0; i < n; i++) cin >> days[i].first >> days[i].second;
    sort(days.begin(), days.end());
    vector<int> d(n);
    vector<double> zn(n);
    for (int i = 0; i < n; i++) {
        if (i == 0) {
            d[i] = days[i].first;
            zn[i] = days[i].second * r;
        } else {
            double koef = binpow(1 - r, days[i].first - days[i - 1].first);
            d[i] = days[i].first;
            zn[i] = koef * zn[i - 1] + days[i].second * r;
        }
    }
    while (m--) {
        int x;
        cin >> x;
        int ind = upper_bound(d.begin(), d.end(), x) - d.begin();
        ind--;
        if (ind == -1) cout << 0 << ' ';
        //cout << x << ' ' << d[ind] << endl;
        else cout << zn[ind] * binpow(1 - r, x - d[ind]) << ' ';
    }
    return 0;
}
