#include <bits/stdc++.h>
#include <vector>
#include <algorithm>
#include <unordered_map>
#include <iomanip>
 
using namespace std;
 
int main() {
    int n, m;
    cin >> n >> m;
    double r;
    cin >> r;
    unordered_map<int, double> d;
    vector<vector<int>> a = {{0, 0}};
    unordered_map<int, double> res;
    for (int i = 0; i < n; ++i) {
        int aa, bb;
        cin >> aa >> bb;
        d[aa] = bb;
        a.push_back({aa, bb});
    }
    sort(a.begin(), a.end());
    unordered_map<int, double> dd;
    unordered_map<int, double> d2;
    vector<double> last = {-1};
    double l = (1 - r);
    double x = 0.0;
    set<double>st;
    vector<int> day;
    for (int i = 0; i < m; ++i) {
        int temp;
        cin >> temp;
        day.push_back(temp);
    }
    a.push_back({day.back(),0});
    for (int i = 0; i <= n; ++i) {
        for (int j = a[i][0]; j < min(a[i + 1][0],a[i][0]+100); ++j) {
            x = (d[j] * r) + x * l;
            d2[j] = x;
            st.insert(x);
            if ((int)st.size() == last.back()) break;
            last.push_back((int)st.size());
        }
    }
    
    cout << fixed << setprecision(7);
    for (int i = 0; i < m; ++i) {
        if (d2[day[i]] > 0) {
            cout << d2[day[i]] << " ";
        } else {
            cout << double(0) << " ";
        }
    }
    return 0;
}