#include <bits/stdc++.h>
#define int long long
#define sz size()
#define pb push_back
#define pf push_front
#define in insert
#define F first
#define S second
#define B begin()
#define E end()
using namespace std;

const int N = 1e5 + 7;
const int mod = 1e9 + 7;
const int inf = 1e10;
int n , m , d[N] , w[N] , q[N] , j;
double f , ans[N];

signed main() {
    cin >> n >> m >> f;
    for (int i = 1; i <= n; i++){
        cin >> d[i] >> w[i];
    } 
    for (int i = 1; i <= m; i++){
        cin >> q[i];
    } 
    if (f == 0) {
        for (int i = 1; i <= m; i++) cout << 0 << ' ';
        return 0;
    }
    for (int i = 1; i <= n; i++) {
        ans[i] = w[i] * f;
        if (i > 1) {
            ans[i] += ans[i-1] * pow(f , d[i] - d[i-1]);
        }
    }
    for (int i = 1; i <= m; i++) {
        int l=1 , r = n;
        while (l <= r) {
            int m = (l + r) / 2;
            if (d[m] <= q[i]) {
                l = m + 1;
                j = m;
            } else {
                r = m - 1;
            }
        }
        cout << ans[j] * pow(f , q[i] - d[j]) << ' ';
    }
}
