#include <bits/stdc++.h>

using namespace std;

#define int long double

signed main()
{
    int n, m;
    cin >> n >> m;
    int r;
    cin >> r;
    vector <pair<int, int>> arr;
    vector <int> ar;
    for (int i = 0; i < n; i++) {
        int a, b;
        cin >> a >> b;
        arr.push_back(make_pair(a, b));
    }
    sort (arr.begin (), arr.end ());

    vector <int> q(m);
    for (int i = 0; i < m; i++) {
        cin >> q[i];
    }
    if (r == 0) {
        cout << 0;
        return 0;
    }
    vector <int> days(q[m - 1] + 1, 0);
    int j = 0;
    for (int i = 1; i <= q[m - 1]; i++) {
        if (arr[j].first == i) {
            j++;
            days[i] = (1 - r) * arr[j - 1].second + (1 - r) * days[i - 1];
        }
        else
            days[i] = (1 - r) * days[i - 1];
    }
    j = 0;
    for (int i = 0; i < q.size(); i++) {
        if (r == 0.5)
            cout << fixed << setprecision(6) << days[q[i]]<< " ";
        else
            cout << fixed << setprecision(6) << days[q[i]] / 2 << " ";
    }
    return 0;
}
