#include <bits/stdc++.h>1

using namespace std;


int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    cout << setprecision(8);
    int n, m, uk = 0;
    cin >> n >> m;
    float r;
    cin >> r;
    map <long long, long long> dw;
    vector <long long> ins(m);
    for (int i = 0; i < n; i++){
        long long x;
        cin >> x >> dw[x];
    }
    for (int i = 0; i < m; i++){
        cin >> ins[i];
    }
    vector <float> oth(ins[m - 1]);
    if (dw.count(1) == 1){
        oth[0] = dw[1] * r;
    } else {
        oth[0] = 0;
    }
    if (ins[0] == 1){
        cout << oth[0] << " ";
        uk++;
    }
    for (int i = 1; i < ins[m - 1]; i++){
        if (dw.count(i + 1) == 1){
            oth[i] = (1 - r) * oth[i - 1] + r * dw[i + 1];
        } else {
            oth[i] = (1 - r) * oth[i - 1];
        }
        if ((i + 1) == ins[uk]){
            cout << oth[i] << " ";
            uk++;
        }
    }
}
