#include <iostream>
#include <vector>
using namespace std;
int main() {
   int n, m;
   cin >> n >> m;
   double r;
   cin >> r;
   vector<pair<int, int>> production_days(n);
   for (int i = 0; i < n; i++) {
       cin >> production_days[i].first >> production_days[i].second;
   }
   vector<int> inspection_days(m);
   for (int i = 0; i < m; i++) {
       cin >> inspection_days[i];
   }
   double waste = 0.0;
   vector<double> results;
   for (int i = 0; i < n; i++) {
       if (i > 0) {
           waste = (1 - r) * waste;
       }
       waste += r * production_days[i].second;
       for (int j = 0; j < m; j++) {
           if (i + 1 == inspection_days[j]) {
               results.push_back(waste);
           }
       }
   }
   for (int i = 0; i < m; i++) {
       cout << fixed << results[i] << endl;
   }
   return 0;
}