#include<bits/stdc++.h>
#define f first
#define s second
using namespace std; 
using ll = long long;
using ld = long double;

bool cmp (pair<int, int> x, pair<int, int> y) {
    if (x.f > y.f) return 1;
}

ld binpow (ld x, ll k) {
    ld res = 1.0;
    while (k) {
        if (k & 1) res *= x;
        x *= x, k /= 2;
    } return res;
}

signed main () {
    // cout << binpow(0.5, 1) << '\n';
    int n, q; cin >> n >> q;
    ld r; cin >> r;
    vector <pair<int, ld>> a(n + 1);
    vector <ld> b(n + 1, 0.0);
    for (int i = 1; i <= n; i++) cin >> a[i].f >> a[i].s;
    sort(a.begin(), a.end());
    b[1] = a[1].s * r;
    // cout << b[1] << ' ';
    for (int i = 2; i <= n; i++) {
        b[i] = b[i - 1] * binpow((1.0 - r), a[i].f - a[i - 1].f) + r * a[i].s; 
        // cout << b[i] << ' ' << r * a[i].s << ' ';
    } 
    // cout << '\n';
    while (q--) {
        int pos; cin >> pos;
        int l = 0, rt = n, res;
        while (l <= rt) {
            int mid = (l + rt) / 2;
            if (pos >= a[mid].f) res = mid, l = mid + 1;
            else rt = mid - 1;
        } 
        // cout << a[res].f << ' ' << pos << ' ' << b[res] << ' ' << binpow((1.0 - r), pos - a[res].f) << ' ';
        if (pos == a[res].f) cout << fixed << setprecision(6) << b[res] << '\n';
        else cout << fixed << setprecision(6) << b[res] * binpow((1.0 - r), pos - a[res].f) << '\n';
    }
    return 0;
}