#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using ld = double;

ld power(ld x, int p) {
    if (p == 0)
        return 1;
    if ((p % 2) == 1) {
        return x * power(x, p - 1);
    }
    ld c = power(x, p / 2);
    return c * c;
}

void solve() {
    int n, m;
    cin >> n >> m;
    ld r;
    cin >> r;
    vector<pair<ld, ld>> days(n);
    for (int i = 0; i < n; i++) {
        cin >> days[i].first;
        cin >> days[i].second;
    }
    sort(days.begin(), days.end());
    vector<ld> dp(n);
    dp[0] = days[0].second * r;
    for (int i = 1; i < n; i++) {
        dp[i] = dp[i - 1] * power(1 - r, days[i].first - days[i - 1].first) + days[i].second * r;
    }
    while (m--) {
        int q;
        cin >> q;
        if (q < days[0].first) {
            cout << 0 << ' ';
            continue;
        }
        int pos = lower_bound(days.begin(), days.end(), make_pair((ld) q, (ld) 0)) - days.begin();
        if (pos == n)
            pos--;
        if (days[pos].first > q)
            pos--;
        int dif = q - days[pos].first;
        ld ans = dp[pos] * power(1 - r, dif);
        cout << fixed << setprecision(8) << ans << ' ';
    }
}

signed main()
{
    int t = 1;
    //cin >> t;
    //freopen("input.in", "r", stdin);
    while (t--) {
        solve();
    }
    return 0;
}
