#include <bits/stdc++.h>

using namespace std;
using ll = long long;
const double inf = 1e18;

double fpow(double a, ll n) {
    if (n == 0) {
        return 1;
    }
    if (n == 1) {
        return a;
    }
    double pol = fpow(a, n / 2);
    if (n % 2 == 1) {
        return pol * pol * a;
    }
    return pol * pol;
}

signed main() {
    std::ios::sync_with_stdio(false), std::cin.tie(nullptr), std::cout.tie(nullptr);
    ll n, m;
    cin >> n >> m;
    double r;
    cin >> r;
    double mod = (1.0 - r);
    set<pair<ll, double>> ans;
    ans.emplace(0, 0);
    vector<pair<ll, ll>> tmp;
    for (ll i = 0; i < n; i++) {
        ll d, w;
        cin >> d >> w;
        tmp.emplace_back(d, w);
    }
    sort(tmp.begin(), tmp.end());
    for (auto [day, w] : tmp) {
        auto [lday, lans] = *(--ans.lower_bound({day, 0}));
        ll dr = day - lday;
        double tmpans = lans * fpow(mod, dr) + r * w;
        ans.emplace(day, tmpans);
    }
    while (m--) {
        ll day;
        cin >> day;
        auto [lday, lans] = *(--ans.lower_bound({day, inf}));
        if (lday == day) {
            cout << setprecision(15) << lans << " ";
            continue;
        }
        ll dr = day - lday;
        double tmpans = lans * fpow(mod, dr);
        cout << setprecision(15) << tmpans << " ";
        ans.emplace(day, tmpans);
    }
}