#include <bits/stdc++.h>
#define ll long long
#define f first
#define s sceond
using namespace std;

int main()
{

      int n,m;
      cin >> n >>m;
      double r;
      cin >> r;
      int ans=0;
       vector <pair<double,double>> a(1e7);
       
     for (int i=0;i<n;i++) {
         double now,now1;
         cin >> now >> now1;
         a[int(now)-1]={now,now1};
     } vector <int> s(m);
     
     for (int i=0;i<m;i++) { 
         cin >> s[i];
     }  int sum=s[m-1];
     vector <double> ans1(sum);
       
     for (int i=0;i<sum;i++) {
         if (i!=0 && a[i].first==double(i)+1.0) {
       ans1[i]=r*a[i].second+(1.0-r)*ans1[i-1];
         } else if (i!=0 && a[i].first!=double(i)+1.0 ) {
             ans1[i]=(1.0-r)*ans1[i-1];
         } else if (i==0 && a[i].first==1.0) {
              ans1[i]=r*a[i].second;
         } else if (i==0 && a[i].first!=1.0) {
             ans1[i]=0.0;
         } 
        
     }   for (auto now : s) {
         cout << ans1[now-1] << " ";
     }
    return 0;
}