#include <bits/stdc++.h>

using namespace std;
#define int long long

double qwe(double x, int y){
       if (y == 0)
       {
               return 1;
 
       }
       if (y % 2 == 0){
            return qwe(x * x, y / 2);
       }
       return x * qwe(x, y - 1);
 
}

signed main(){
    int n, m;
    cin>>n>>m;
    double r;
    cin>>r;
    vector<double> v(100000, 0);
    vector< pair<int, long long> > f; 
    for(int i = 0; i < n; i++){
        int x, y;
        cin>>x>>y;
        f.push_back({x, y});
    }
    sort(f.begin(), f.end());
    for(int i = 0; i < m; i++){
        long long x;
        cin>>x;
        double colvo = 0, colvo1 = 0;
        int j = 0, qwer = 0;
        for(int i = 1; i <= x; i++){
            if(j < f.size() and f[j].first == i){
                colvo = colvo1 * (1 - r) + r * f[j].second;
                j++;
                colvo1 = colvo;
            }
            else{
                 colvo = colvo1 * (1 - r);
                 colvo1 = colvo;
            }
            if(j == f.size()){
                qwer = x - i;
                break;
            }
        }
            colvo *= qwe((1 - r), qwer);
            string c;
            c = to_string(colvo);
            int count = 0;
            for(int i = 2; i < c.size(); i++){
                if(c[i] == '9') count++;
            }
            if(count == 6) colvo = round(colvo);
        c = to_string(colvo);
        int y = 1;
        count = 1;
        while(true){
            if(c[y] == '.'){
                count = y + 1;
                break;
            }
                y++;
            }
            if(c[count] == '0') cout<<colvo<<" ";
            else{
                cout<<fixed;
                cout.precision(6);
                cout<<colvo<<" ";
            }
        }
    }

