#include <bits/stdc++.h>
using namespace std;

const int N_MAX = 1e9 + 100;
int n, m, d, w, q, max_d = 0;
double r;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    cin >> n >> m >> r;
    map<int, int> days;
    for (int i = 0; i < n; i++) {
        cin >> d >> w;
        max_d = max(d, max_d);
        days[d - 1] = w;
    }

    long double prod[max_d];
    prod[-1] = 0;
    for (int i = 0; i < max_d; i++) {
        if (days[i] == 0) {
            prod[i] = prod[i - 1] * (1 - r);
            continue;
        }
        prod[i] = (1 - r) * prod[i - 1] + r * days[i];
    }

    cout << fixed << setprecision(6);
    for (int i = 0; i < m; i++) {
        cin >> q;
        if (q >= max_d) {
            long double res;
            if (r == 0)
                res = 0;
            else {
                res = prod[max_d - 1];
                for (int j = 0; j < q - max_d; j++)
                    res *= (1 - r);
            }
            cout << res << " ";
        }
        else
            cout << prod[q - 1] << " ";
    }

    return 0;
}
