#include <bits/stdc++.h>

using namespace std;

#define ld long double
#define ll long long

ld bin_pow(ld a, ll n){
    if(n == 0) return 1;
    if(n % 2 == 1) return (bin_pow(a, n - 1) * a);
    else{
        ld x = bin_pow(a, n / 2);
        return (x * x);
    }
}

struct day
{
    ld d, w, i;
    bool type;
    day(ld a, ld b, bool c, int i): d(a), w(b), type(c), i(i){};
};

bool cmp(day &a, day &b) {
    if(a.d == b.d){
        return a.type < b.type;
    }
    return a.d < b.d;
}

int main(){
    cout.precision(10);
    ld n, m;
    cin >> n >> m;
    double r;
    cin >> r;
    vector<day> days;
    vector<ld> req(m);
    for(ld i = 0; i < n; ++i){
        ld x, y;
        cin >> x >> y;
        days.push_back(day(x, y * r, false, -1));
    }
    
    for (ld i = 0; i < m; ++i) {
        ld x; cin >> x;
        days.push_back(day(x, 0, true, i));
    }

    sort(days.begin(), days.end(), cmp);

    for(ld i = 1; i < days.size(); ++i){
        days[i].w += bin_pow((1 - r), days[i].d - days[i - 1].d) * days[i - 1].w;
    }

    for (day d: days) {
        if(d.type == 1){
            req[d.i] = d.w;
        }
        //cout << d.w << ' ' << d.type << '\n';
    }
    for(auto i : req){
        cout << i << " ";
    }
}