#include<bits/stdc++.h>
#define fi first
#define se second
#define ll long long
#define ld long double
using namespace std;
ld binpow(ld x, ll pw) {
    ld num = 1;
    while (pw) {
        if (pw & 1)
            num *= x;
        x *= x;
        pw >>= 1;
    }
    return num;
}
int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
    cout<<fixed<<setprecision(9);
    ll n, m;
    ld r;
    cin >> n >> m >> r;
    pair<ll, ll> p[n + 1];
    vector<pair<ll, ld>> ans;
    ans.push_back({1, 0});
    for (ll i = 1; i <= n; ++i)
        cin >> p[i].fi >> p[i].se;
    sort(p + 1, p + n + 1);
    for (ll i = 1; i <= n; ++i) {
        ld num = ans.back().se, tm = ans.back().fi;
        pair<ll, ld> now;
        now.fi = p[i].fi;
        now.se = num * binpow((1 - r), p[i].fi - tm) + r * p[i].se;
        ans.push_back(now);
    }
    while (m--) {
        ll pos, l1 = -1, r1 = ans.size();
        cin >> pos;
        while (l1 + 1 < r1) {
            ll mid = (l1 + r1) >> 1;
            if (ans[mid].fi <= pos)
                l1 = mid;
            else
                r1 = mid;
        }
        cout << ans[l1].se * binpow((1 - r), pos - ans[l1].fi) << ' ';
    }
    return 0;
}
