#include <iostream>
#include <iomanip>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;
struct event{
    int day, type, colvo;
};
bool cmp(event a, event b) {
    return forward_as_tuple(a.day, a.type, a.colvo) < forward_as_tuple(b.day, b.type, b.colvo);
}
long double degs(long double a, int n) {
    if (n==0) {return 1.0;}
    if (n%2==0) {return degs(a*a, n/2);}
    return a * degs(a, n-1);
}
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int n,m; cin >> n >> m;
    long double r; cin >> r;
    vector <event> s;
    for (int i=0;i<n; i++) {
        int days, colvo; cin >> days >> colvo;
        s.push_back({days, -1, colvo});
    }
    vector <long double> answer(m);
    for (int i=0; i<m; i++) {
        int days; cin >> days;
        s.push_back({days, 1, i});
    }
    sort(s.begin(), s.end(), cmp);
    long double x = 0.0;
    int lastday = -1;
    for (int i=0; i<n+m; i++) {
        long double koef = degs(1-r, s[i].day - lastday);
        if (s[i].type == 1) {
            //запрос
            x *= koef;
            answer[s[i].colvo] = x;
        } else {
            x *= koef;
            x += (1.0 * s[i].colvo * r);
        }
        lastday = s[i].day;
    }
    cout << setprecision(10) << fixed;
    for (int i=0; i<m; i++) {cout << answer[i] << " ";}
    return 0;
}