#ifdef Local
#define _GLIBCXX_DEBUG
#endif

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef long double ld;


template<typename T>
istream &operator>>(istream &in, vector<T> &a) {
    for (auto &i: a)in >> i;
    return in;
}

template<typename T>
ostream &operator<<(ostream &out, vector<T> &a) {
    for (auto &i: a)out << i << ' ';
    return out;
}

bool cmp(pair<ld, int> x, pair<ld, int> y){
    return x.second < y.second;
}
ld fastpow(ld r, int st){
    if (st <= 0) return 1;
    ld fp = fastpow(r, st/2);
    if (st%2 == 0) return fp*fp;
    return fp*fp*r;
}

void solve() {
    ld r;
    int n, m;
    cin >> n >> m >> r;
    vector<pair<ld, int>> x(n);
    for (int i = 0; i < n; ++i) {
        ld w;
        int d;
        cin >> d >> w;
        x[i] = {w, d};
    }sort(x.begin(), x.end(), cmp);
    x[0].first *= r;
    for (int i = 1; i < n; ++i) {
        x[i].first = x[i - 1].first * fastpow(1 - r, x[i].second-x[i-1].second) + r * x[i].first;
    }
    for (int i = 0; i < m; ++i) {
        int lf = -1, rg = n, mid;
        int q;
        cin >> q;
        while (rg - lf > 1) {
            mid = (lf + rg) / 2;
            if (x[mid].second <= q) lf = mid;
            else rg = mid;
        }
        if (lf > -1 and x[lf].second == q) cout << x[lf].first << ' ';
        else if (lf == -1) cout << 0 << ' ';
        else cout << x[lf].first * fastpow(1 - r, q - x[lf].second) << ' ';
    }
}

signed main() {
#ifdef Local
    freopen("in.in","r",stdin);
    freopen("out.out","w",stdout);
#else
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
#endif
    int t = 1;
    cout.precision(20);
    if (t == -1)cin >> t;
    for (int i = 0; i < t; i++)solve();
}

