#include <iostream>
#include <vector>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <iomanip>
#include <algorithm>
#include <map>
#include <deque>
#define int long long
#define double long double
using ll = long long;
using namespace std;
const int mod = 1e9 + 7;
const int INF = 1e9 + 7;
#define get_time (double)clock() / (double)(CLOCKS_PER_SEC)
#ifndef ONLINE_JUDGE
#define debug(x) cerr << (#x) << ": " << x << endl;
#else
#define debug(x)
#endif
ll max(ll a, ll b) {
    return (a > b) ? a : b;
}
ll min(ll a, ll b) {
    return (a < b) ? a : b;
}
ll bs_sqrt(ll x) {
    ll left = 0, right = 2000000123;
    while (right > left) {
        ll mid = (left + right) / 2;
        if (mid * mid > x) {
            right = mid;
            continue;
        }
        left = mid + 1;
    }
    return left - 1;
}
int gcd(int a, int b) {
    while (a > 0 && b > 0) {
        int c = a;
        a = b % a;
        b = c;
    }
    return a + b;
}
double bin_pow(double a, int n) {
    if (n <= 0) return 1;
    if (n % 2 == 0) {
        double t = bin_pow(a, n / 2);
        return (t * t);
    }
    else {
        double t = bin_pow(a, n - 1);
        return (t * a);
    }
}
void solve() {
    int n, m;
    double r;
    cin >> n >> m >> r;
    vector<pair<int, pair<int, double> > > all;
    for (int i = 0; i < n; i++) {
        int d;
        double w; cin >> d >> w;
        all.push_back({ d,{0,w} });
    }
    map<int, double > for_ans;
    vector<int> ques;
    set<int> l;
    for (int i = 0; i < m; i++) {
        int d;
        cin >> d;
        l.insert(d);
        ques.push_back(d);
        all.push_back({ d,{1,-1} });
    }
    sort(all.begin(), all.end());
    int pr = 1;
    double cur = 0;
    for (int i = 0; i < all.size(); i++) {
        int new_d = all[i].first;
        int fl = all[i].second.first;
        if (new_d > pr) {
            double p = bin_pow((1 - r), new_d - pr - 1 - fl);
            cur *= p;
        }
        if (all[i].second.first == 0) {
            double w = all[i].second.second;
            cur = cur + w * r;
            if (l.count(new_d) == 0) cur = cur * (1 - r);
        } else {
            for_ans[new_d] = cur;
        }
        if (fl) cur = cur * (1 - r);
        pr = new_d;
    }
    for (auto c : ques) {
        cout << for_ans[c] << '\n';
    }
}
signed main() {
    /*
    #ifdef ONLINE_JUDGE
    freopen("game.in", "r", stdin);
    freopen("game.out", "w", stdout);
    #endif
    */
    cout << fixed << setprecision(20);
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int t = 1;
    //cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}