#include <bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
#include <map>
#include <deque>
#include<stack>
#include<string>
#include<string.h>
#include<set>
#include<bitset>
#include<stdlib.h>
#include<cassert>
#include<time.h>
#include<bitset>  
#define ll long long 
#define add push_back
#define fast_io ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define first_elem first    
#define vector_size size()
#define all_elements(x) x.begin(), x.end()
#define second_elem second

using namespace std;

double probabilities[1000001];

void custom_algorithm() {
    int total_size, query_length;
    double success_ratio;
 
    cin >> total_size >> query_length >> success_ratio;
 
    probabilities[1] = (1 - success_ratio);
 
    for(int i = 2; i <= 1000000; i++) {
        probabilities[i] = probabilities[i - 1] * (1 - success_ratio);
    }
 
    double d[total_size + 1];
    double w[total_size + 1];
    map<int, int> my_map;
    vector<pair<int, double>> my_data_vector;
 
    for(int i = 1; i <= total_size; i++) {
        cin >> d[i] >> w[i];
        if(!my_map[d[i]]) {
            my_map[d[i]] = 1;
            my_data_vector.add({d[i], w[i]});
        }
    }
    int q[query_length + 1];
    for(int i = 1; i <= query_length; i++) {
        cin >> q[i];
        if(!my_map[q[i]]) {
            my_map[q[i]] = 1;
            my_data_vector.add({q[i], 0.0});
        }   
    }
    sort(all_elements(my_data_vector));
    map<int, double> my_new_data_map;
 
    double x = 0;
    int position = 0;
 
    for(int i = 0; i < my_data_vector.vector_size; i++) {
        int current_pos = my_data_vector[i].first_elem - position;
        if(current_pos > 1000000) {
            current_pos = 1000000;
        }
        x = (x * probabilities[current_pos]) + (success_ratio * my_data_vector[i].second_elem);
        my_new_data_map[my_data_vector[i].first_elem] = x;
        position = my_data_vector[i].first_elem;
    }
    for(int i = 1; i <= query_length; i++) {
        cout << fixed << setprecision(10) << my_new_data_map[q[i]] << ' ';
    }
}
     
int main() {
    fast_io;      
    custom_algorithm();    
}