#include <bits/stdc++.h>
#define int long long
using namespace std;
typedef long double ld;

ld bin_pow(ld x, int k){
    if (k == 0) return 1;
    if (k == 1) return x;
    if (k % 2){
        return x * bin_pow(x, k - 1);
    } else {
        ld ans = bin_pow(x, k / 2);
        return ans * ans;
    }
}

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(10);

    int n, m;
    cin >> n >> m;
    ld r;
    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());

    vector<ld> ans(m);
    vector<pair<int, int>> queries(m);
    for (int i = 0; i < m; ++i){
        cin >> queries[i].first;
        queries[i].second = i;
    }
    sort(queries.begin(), queries.end());

    ld x = 0;
    int day = 0, ind = 0;
    for (auto q : queries){
        while (day < q.first){
            if (ind < n && a[ind].first <= q.first){
                x *= bin_pow((1.0 - r), a[ind].first - day - 1);
                x = (1.0 - r) * x + r * a[ind].second;
                day = a[ind].first;
                ind++;
            } else {
                x *= bin_pow((1.0 - r), q.first - day);
                day = q.first;
            }
        }
        ans[q.second] = x;
    }

    for (ld i : ans){
        cout << i << " ";
    }


}


/*
 3 3
 0.5
 2 6
 3 8
 4 10
 1 3 5

 5 6
 0.3333333
 1 27
 6 27
 3 27
 4 27
 5 27
 1 2 3 4 5 6

 1 1
 0
 1 1000000000
 1000000000

 */