// #pragma GCC optimize("O3,unroll-loops")
// #pragma GCC target("avx2,bmi,bmi2,popcnt,lzcnt")

#include <bits/stdc++.h>
 
#define int long long 
#define pb push_back
#define ui unsigned int
#define ld long double
#define pl pair<long long int,  long long int>
#define boost ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ff first    
#define ss second
#define sz size()
#define all(x) x.begin(), x.end()
 
using namespace std;
 
const int maxn = 5e5 + 11;
const int inf = 1e18 + 1;
const int mod = 1e9 + 7;
// const int mod = 998244353;
const int dx[] = {-1, 0, 0, 1, -1, -1, 1, 1};
const int dy[] = {0, -1, 1 , 0, -1, 1, -1, 1};
const double eps = 1e-10;

double f[1000001];

void solve() {
    int n, m;
    double r;

    cin >> n >> m >> r;

    f[ 1 ] = (1 - r);

    for(int i = 2; i <= 1000000; i++) {
        f[ i ] = f[i - 1] * (1 - r);
    }

    double d[n + 1];
    double w[n + 1];
    map<int, int> mp;
    vector<pair<int, double>> v;

    for(int i = 1; i <= n; i++) {
        cin >> d[ i ] >> w[ i ];
        if(!mp[d[ i ]]) {
            mp[d[ i ]] = 1;
            v.pb({d[ i ], w[ i ]});
        }
    }
    int q[m + 1];
    for(int i = 1; i <= m; i++) {
        cin >> q[ i ];
        if(!mp[q[ i ]]) {
            mp[q[ i ]] = 1;
            v.pb({q[ i ], 0.0});
        }   
    }
    sort(all( v ));
    map<int, double> mpp;

    double x = 0;
    int pos = 0;

    for(int i = 0; i < v.sz; i++) {
        int poss = v[ i ].ff - pos;
        if(poss > 1000000) {
            poss = 1000000;
        }
        x = (x * f[poss]) + (r * v[ i ].ss);
        // cout << v[ i ].ff << ' ' << x << "\n";

        mpp[v[ i ].ff] = x;
        pos = v[ i ].ff;
    }
    for(int i = 1; i <= m; i++) {
        cout << fixed << setprecision(10) << mpp[ q[ i ] ] << ' ';
    }
}
    
signed main() {
    // freopen("sum.in", "r", stdin); 
    // freopen("sum.out", "w", stdout);
 
    boost;      

    int tt = 1;

    // cin >> tt;

    for(int i = 1; i <= tt; i++) {
        // cout << "Case " << i << ":\n";
        solve();    
    }           
}