#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <cmath>
#include <numeric>
#include <string>
#include <set>
#include <iomanip>
#include <stack>
#include <cctype>

using namespace std;
#define ll long long
#define ld long double
#define print(a) for (auto i: a){cout << i << " ";}cout << endl;
#define dprint(a) for (ll i = 0; i < a.size(); i++){ cout << i << ": ";for(auto j: a[i]){cout << j << "\t";}cout << endl;}cout << endl;
#define open(name_input, name_output) freopen(name_input, "r", stdin); freopen(name_output, "w", stdout);
#define input(a, n) for(ll i = 0; i < n; i++){cin>>a[i];}
#define tests ll number_of_tests; cin>>number_of_tests; while(number_of_tests--)
#define slprint(sl) for(auto i: sl){ cout << i.first << " " << i.second << endl;}

bool comp(pair<ll, ll> a, pair<ll, ll> b){
    return a.first < b.first;
}

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n, m;
    ld r;
    ll d, w;
    cin >> n >> m >> r;
    vector<pair<ll, ll>> c;
    for (int i = 0; i < n; ++i) {
        cin >> d >> w;
        c.push_back(make_pair(d, w));
    }
    std::sort(c.begin(), c.end(), comp);
    vector<pair<ll, ld>> ans;
    ll last1 = 0;
    ld last2 = 0;
    for (auto i: c){
        last2 = last2 * pow(1 - r, i.first - last1) + r * i.second;
        last1 = i.first;
        ans.push_back(make_pair(i.first, last2));
    }

    for (int i = 0; i < m; ++i) {
        cin >> d;
        if (d < ans[0].first){
            cout << 0 << " ";
            continue;
        }
        int a1 = 0, a2 = n;
        while(a2 - a1 > 1){
            int mid = (a1 + a2) / 2;
            if (ans[mid].first <= d){
                a1 = mid;
            }
            else{
                a2 = mid;
            }
        }
        cout << setprecision(10) << (ld)ans[a1].second * pow(1 - r, d - ans[a1].first) << " ";
    }


}




