#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>

using namespace std;

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    cout.setf(ios::fixed);
    cout.precision(6);
    int n, m;
    double r;
    cin >> n >> m >> r;
    vector<pair<int, long double>>d(n);
    vector<int>q(m);
    for (int i = 0; i < n; i++) {
        cin >> d[i].first;
        cin >> d[i].second;
    }
    for (int i = 0; i < m; i++) {
        cin >> q[i];
    }
    sort(q.begin(), q.end());
    sort(d.begin(), d.end());
    d[0].second = r * d[0].second;
    for (int i = 1; i < n; i++) {
        d[i].second = d[i - 1].second * pow(1 - r, d[i].first - d[i - 1].first) + r * d[i].second;
    }
    for (int i = 0; i < m; i++) {
        if (q[i] < d[0].first) {
            cout << 0 << " ";
        }
        else {
            int l = 0, t = n;
            for (int j = 0; j < 50; j++) {
                int s = (l + t) / 2;
                if (q[i] >= d[s].first) {
                    l = s;
                }
                else {
                    t = s;
                }
            }
            cout << d[l].second * pow(1 - r, q[i] - d[l].first) << " ";
        }
    }
}