#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

#pragma GCC optimize("03")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx,avx2,bmi2,fma")

using namespace std;
//using namespace __gnu_pbds;

//gp_gash_table<int,int>mp;
#define int long long
#define double long double
#define pb push_back
#define ld long double
#define endl '\n'
#define all(a) a.begin(), a.end()

const int INF = 2e18, MOD = 1e9 + 7, MAXN = 2e5;

struct po{
    int d, w;
    bool q;
    int ind;
};

bool comp(po a, po b) {
    return a.d < b.d || (a.d == b.d && (!a.q && b.q));
}

double bpow(double a, int m) {
    if (m == 0) {
        return 1;
    }
    if (m % 2 == 0) {
        double x = bpow(a, m/2);
        return x * x;
    } else {
        return a * bpow(a, m-1);
    }
}


void solve() {
    cout << fixed << setprecision(12);
    int n, q;
    cin >> n >> q;
    double r;
    cin >> r;
    vector<po>vec;
    for (int i = 0; i < n; i++) {
        int d, w;
        cin >> d >> w;
        vec.push_back({d,w,0});
    }
    for (int i = 0; i < q; i++) {
        int d;
        cin >> d;
        vec.push_back({d, 0,1, i});
    }
    sort(vec.begin(), vec.end(),comp);
    int l = 0; double x = 0;
    vector<double>ans(q);
    for (auto i : vec) {
        if (i.q) {
            x *= bpow(1-r, i.d - l);
            ans[i.ind] = x;
        } else {
            x *= bpow((double)1-r, i.d - l);
            x += r * i.w;
        }
        l = i.d;
    }
    for (auto i : ans) {
        cout << i << " ";
    }
}

signed main() {
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int t = 1;
    // cin >> t;
    while(t--) {
        solve();
    }
}