#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <iomanip>

using namespace std;
// #define int long long


signed main()
{
    int n, m;
    cin>>n>>m;
    double r;
    cin>>r;
    map<int, double> mapik;
    int q1;
    double q2;
    for (int i=0;i<n;i++) {
        cin>>q1>>q2;
        mapik[q1] = q2;
    }
    map<int,bool> mapik1;
    int maxi = 0;
    for (int i=0;i<m;i++) {
        cin>>q1;
        mapik1[q1] = 1;
        maxi = max(maxi, q1);
    }
    double x = 0;
    for (int i=1;i<=maxi;i++) {
        x = (1.0-r)*x + r*mapik[i];
        if (mapik1[i]) {
            cout << fixed << setprecision(6) << x <<" ";
        }
    }
}
