//#pragma GCC optimize("0fast")
//#pragma GCC optimize("popcnt, bm2")

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <random>
using namespace __gnu_pbds;
using namespace std;

double pow(int p, double num) {
    if (p == 0) {
        return 1;
    }
    if (p == 1) {
        return num;
    }
    else if (p % 2 == 1) {
        double val = pow(p / 2, num);
        return val * val * num;
    }
    else {
        double val = pow(p / 2, num);
        return val * val;
    }
}
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr); cout.tie(nullptr);
//    freopen("input.txt", "r", stdin);
//    freopen("output.txt", "w", stdout);
    int n, m;
    double r;
    cin >> n >> m >> r;
    set<int> waste_keys;
    unordered_map<int, double> waste;
    for (int i = 0; i < n; ++i) {
        int d, w;
        cin >> d >> w;
        waste_keys.insert(d);
        waste[d] = w;
    }
    double prev_value = 0;
    int prev_d = 0;
    for (auto waste_key : waste_keys) {
        waste[waste_key] = (prev_value * pow(waste_key- prev_d, (1 - r)) + r * waste[waste_key]);
        prev_d = waste_key;
        prev_value = waste[waste_key];
    }
    for (int i = 0; i < m; ++i) {
        int num;
        cin >> num;
        auto close_val = waste_keys.lower_bound(num);
        if (close_val == waste_keys.begin() && *close_val != num) {
            cout << 0 << " ";
        }
        else{
            if (*close_val == num) {
                cout << setprecision(8) << fixed;
                cout << waste[num] << " ";
            }
            else {
                int val = *(--close_val);
                cout << setprecision(8) << fixed;
                cout << (waste[val] * pow(num - val, (1-r))) << " ";

            }

        }
    }
    set<int> answers_keys;
    gp_hash_table<int, double> answers;

    return 0;
}
