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

#define ll long long
#define ld long double
using namespace std;
int main()
{
    int n; cin >> n;
    int m; cin >> m;
    ld r; cin >> r;
    vector <pair <ll, ll>> d(n);
    for (int i = 0; i < n; i++) {
        cin >> d[i].first >> d[i].second;
    }
    sort(d.begin(), d.end());
    vector <pair<ll, int>> q(m);
    vector < ld > answer(m);
    for (int i = 0; i < m; i++) {
        cin >> q[i].first;
        q[i].second = i;
    }
    sort(q.begin(), q.end());
    int cur = 0;
    int i = 0;
    while (q[i].first < d[0].first && i < m) {
        answer[q[i].second] = 0;
        i++;
    }
    ld x = 0;
    vector <bool> used(n);
    for (; i < m; i++) {
        while (cur < n && d[cur].first <= q[i].first) {
            if (!used[cur]) {
                if (cur == 0) x = ((1 - r) * x + r * d[cur].second);
                else {
                    int days = d[cur].first - d[cur - 1].first - 1;
                    x *= pow((1 - r), days);
                    x = ((1 - r) * x + r * d[cur].second);
                }
            }
            used[cur] = 1;
            cur++;
        }
        cur--;
        if (q[i].first == d[cur].first) answer[q[i].second] = x;
        else {
            int days = q[i].first - d[cur].first;
            answer[q[i].second] = x * pow((1 - r), days);
        }
    }
    for (auto now : answer) {
        cout << setprecision(15) << now << " ";
    }
    return 0;
}