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

int main() {
    cout<<fixed<<setprecision(6);
    long double n,m,r,f=0,ss=0;
    cin>>n>>m>>r;
    map<long double ,long double> a;
    vector<long double> b(m);
    for(int i=0;i<n;i++){
        int s,s1;
        cin>>s>>s1;
        a[s]=s1;
    }
    for(int i=0;i<m;i++){cin>>b[i];f=max(f,b[i]);}
    vector<long double> z(f);
    for(int i=0;i<f;i++){
        if(a[i+1]!=0){
            z[i]=(ss*r)+(r*a[i+1]);
        }else{
            z[i]=ss*(1-r);
        }
        ss=z[i];
    }
    if(m>0){
        cout<<round(z[b[0]-1]*100000)/100000;
        for(int i=1;i<m;i++){
            cout<<" "<<round(z[b[i]-1]*100000)/100000;
        }
    }
    return 0;
}
