#include <bits/stdc++.h>
#define fi first
#define se second

using namespace std;
typedef long long ll;

double step(double a, int n) {
    if (n == 0)
        return 1;
    if (n % 2 == 0) {
        double t = step(a, n / 2);
        return t * t;
    } else {
        return step(a, n - 1) * a;
    }
}

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);

    int n, m;
    long double r;
    cin >> n >> m;
    cin >> r;
    map <int, double> ans;
    vector <int> days(1, 0);
    ans[0] = 0;
    for (int i = 0; i < n; i++) {
        int d, wt;
        cin >> d >> wt;
        ans[d] = wt;
        days.push_back(d);
    }
    sort(days.begin(), days.end());
    int dp = 0;
    for (auto [d, w] : ans) {
        ans[d] = step((1 - r), d - dp) * ans[dp] + r * ans[d];
        dp = d;
    }
    while (m--) {
        int d;
        cin >> d;
        int id_dp = lower_bound(days.begin(), days.end(), d) - days.begin();
        if (d != days[id_dp]) {
            id_dp--;
        }
        int dp = days[id_dp];
        cout << setprecision(7) << fixed << step((1 - r), d - dp) * ans[dp] << '\n';
    }
}
