///@author: suuuiii
//#pragma GCC target("avx2")
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("O3")

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

#define int128 __int128
#define int long long
#define ll long long
#define ld long double
#define ve vector
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define pb push_back
#define eb emplace_back
#define INF1 INT32_MAX
#define INF2 INT64_MAX
#define sz(x) (int)(x).size()


using namespace std;
using namespace __gnu_pbds;
random_device rd;
mt19937 rnd(rd());


int rand(int l, int r) {
    return l + rnd() % (r - l + 1);
}

template<typename key, typename cmp = less<key>>
using pbds = tree<key, null_type, cmp, rb_tree_tag, tree_order_statistics_node_update>;

const int Size = (1ll << 3), maxn = (int)1e5*2+1;

ld bp(ld a, int n) {
    ld res = 1;
    while (n) {
        if (n&1) --n, res *= a;
        else n >>= 1, a*=a;
    }
    return res;
}

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

    ve<pair<int, int>> mas(n);

    for (auto&[d, w] : mas) cin >> d >> w;

    sort(all(mas));

    ve<int> q(m);
    for (int &i : q) cin >> i;

    ve p = q;
    sort(all(p));
    p.erase(unique(all(p)), p.end());

    map<int, ld> res;

    int cur = -1;
    ld ans = 0;
    for (int i : p) {
        while (cur + 1 < n && mas[cur+1].first <= i) {
            if (cur != -1) {
                ans *= bp(1l-r, mas[cur + 1].first - mas[cur].first);
            }
            ++cur;

            ans += mas[cur].second*r;
        }

        if (cur!=-1) res[i] = ans * bp(1l-r, i-mas[cur].first);
        else res[i] = 0;
    }

    for (int i : q) {
        cout << res[i] << " ";
    }
}

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int tt = 1;
    cout << setprecision(8) ;
//    cin >> tt;
    while (tt--){
        solve();
    }
}