#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <random>
#include <numeric>
#include <map>
#include <set>
#include <string>
#include <iomanip>

using namespace std;
using ll = long long;
using ld = long double;

#define deb(x) cerr << #x << ":\t" << x << '\n';
#define len(x) (ll) x.size()
#define ff first
#define ss second

const ll INF = 1e18;
const ll MOD = 1e9 + 7;

ld binpow(ld a, ll b) {
    if (b == 0) return (ld)1;
    if (b % 2 == 0) return binpow(a * a, b / 2);
    else return binpow(a, b - 1) * a;
}

void solve() {
    ll n, m; cin >> n >> m;
    ld r; cin >> r;
    vector<pair<ll, ll>> a(n + 1);
    for (int i = 1; i <= n; i++) {
        cin >> a[i].ff >> a[i].ss;
    }
    sort(a.begin(), a.end());
    vector<ld>ot(1, (ld)0);
    vector<ll>d(1, 0);
    for (int i = 1; i <= n; i++) {
        ot.emplace_back(binpow((ld)1 - r, a[i].ff - a[i - 1].ff) * ot[i - 1] + (ld)a[i].ss * r);
        d.emplace_back(a[i].ff);
    }
    for (int i = 0; i < m; i++) {
        ll dnw; cin >> dnw;
        ll j = upper_bound(d.begin(), d.end(), dnw) - d.begin() - 1;
        cout << ot[j] * binpow(1 - r, dnw - d[j]) << ' ';
    }
}

int main() {
    int T = 1;
//    cin >> T;
    cout << setprecision(9) << fixed;
    while (T--) {
        solve();
    }
    return 0;
}
