#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using ld = long double;
using pii = pair<int, int>;

const int inf = 1e9;
const ll infll = 1e18;

struct event {
    int x, type;
    ld w;
    int id;
};

void solve() {
    int n, m;
    cin >> n >> m;
    ld r; cin >> r;

    vector<event> a(n + m);
    for (int i = 0; i < n; ++i) {
        int x; cin >> x;
        ld w; cin >> w;
        a[i] = {x, 0, w, i};
    }
    for (int i = 0; i < m; ++i) {
        int x; cin >> x;
        a[i + n] = {x, 1, 0, i};
    }
    sort(a.begin(), a.end(), [](event l, event r){
        if (l.x == r.x)
            return l.type < r.type;
        return l.x < r.x;
    });

    ld cur = 0;
    int last = 0;
    vector<ld> ans(m);
    for (int i = 0; i < n + m; ++i) {
        auto e = a[i];
        int x = e.x, type = e.type;
        ld w = e.w;
        int id = e.id;

        cur = cur * pow(((ld)1 - r), (int)(x - last));
        if (type == 0) {
            cur = cur + w * r;
        } else {
            ans[id] = cur;
        }
        last = x;
    }
    for (auto &x : ans)
        cout << x << ' ';
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(6) << '\n';
    //freopen("input.txt", "r", stdin);

    int t = 1;
    //cin >> t;
    while (t--)
        solve();
}

