#include<bits/stdc++.h>

#define ll long long

using namespace std;

const int N = (int)1e5 + 7;
const long long INF = (long long)1e18 + 7;

int n, m;
ll d[N];
double r, p[N], w[N];

double binpow(double a, ll b){
    double res = 1.0;
    while(b){
        if(b&1)
            res = res * a;
        b >>= 1;
        a = a * a;
    }
    return res;
}


int main() {
    ios_base::sync_with_stdio(NULL);
    cin.tie(0);
    cin >> n >> m >> r;
    vector<pair<ll, double>> v;
    for(int i = 1; i <= n; ++i){
        pair<ll, double> x;
        cin >> x.first >> x.second;
        v.push_back(x);
    }
    sort(v.begin(), v.end());
    for(int i = 1; i <= n; ++i)
        d[i] = v[i-1].first, w[i] = v[i-1].second;
    for(int i = 1; i <= n; ++i){
        double x = p[i-1] * binpow(1-r, d[i]-d[i-1]);
        p[i] = x + w[i] * r;
    }
    cout << fixed << setprecision(6);
    while(m--){
        ll q;
        cin >> q;
        int l = 0, rr = n, pos = 0;
        while(l <= rr){
            int mid = l + rr >> 1;
            if(d[mid] <= q) pos = mid, l = mid + 1;
            else rr = mid - 1;
        }
        if(d[pos] == q){
            cout << p[pos] << ' ';
            continue;
        }
        double x = p[pos] * binpow(1.0-r, q-d[pos]);
        cout << x << ' ';
    }
    return 0;
}


