#include <bits/stdc++.h>

using namespace std;

map<int, long double> U;
long double r;

long double S(long double n) {
    if (n == 1) return U[1]*r;
    return S(n-1)*((long double)1-r)+U[n]*r;
}

int main () { cout.tie(0);
    ios::sync_with_stdio(false); cin.tie(0);
    int n, m;
    cin >> n >> m;
    cin >> r;
    while (n--) {
        int d, w;
        cin >> d >> w;
        U[d] = w;
    }
    cout.precision(7);
    while (m--) {
        int req;
        cin >> req;
        cout << S(req) << ' ';
    }
    cout << endl;
}
