#include <bits/stdc++.h>
#define ll long long
#define ff first
#define ss second
#define pb push_back
#define mp make_pair

using namespace std;

int ub(int x, vector<pair<int, int>>& a) {
    int l = -1, r = a.size();
    while (l + 1 < r) {
        int m = (l + r) / 2;
        if (a[m].ff <= x) {
            l = m;
        } else {
            r = m;
        }
    }
    return r;
}

signed main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n, m;
    double r;
    cin >> n >> m;
    cin >> r;
    vector<pair<int, int> > a(n);
    for (int i = 0; i < n; ++i)
        cin >> a[i].first >> a[i].second;
    sort(a.begin(), a.end());
    if (r == 0) {
        for (int i = 0; i < m; ++i) {
            int x;
            cin >> x;
        }
        while (m--)
            cout << 0 << ' ';
        return 0;
    }
    vector<double> xx(n);
    xx[0] = a[0].ss * r;
    for (int i = 1; i < n; ++i) {
        xx[i] = r * a[i].ss + xx[i - 1] * pow((1 - r), a[i].ff - a[i - 1].ff);
    }
    for (; m; m--) {
        int q;
        cin >> q;
        int i = ub(q, a);
        i--;
        if (i == -1) {
            cout << 0 << ' ';
            continue;
        }
        cout << fixed << setprecision(6) << xx[i] * pow((1 - r), q - a[i].ff) << ' ';
    }
    return 0;
}
