#include <string>
#include <iostream>
#include <vector>
#include <set>
#include <iomanip>
#include <stack>
#include <cmath>
#include <map>
#include <tuple>
#include <numeric>
#include <queue>
#include <algorithm>
#include <bitset>
#include<iterator>
#include <fstream>
#include <random>
#include <unordered_map>
#include <ctime>
#include <sstream>

using namespace std;

#define INF 1e17
#define MOD %=((ll)1000000007);
#define ll long long
#define si short int
#define ull unsigned long long
#define str string
#define vc vector //by jgjgjjg :)
#define db double 
#define fco {ios_base::sync_with_stdio(0);std::cout.tie(0); std::cin.tie(0); }
#define scan(t) {for (ll i = 0; i<(t.size()); i++) std::cin >> t[i];}
#define cf {fflush(stdout);}
#define SUM(a,sum) ll sum = 0; for (auto _p:a) sum += _p;
#define MAX(a, mx, pos) ll mx = -(1e18+1); ll pos = 0;FOR(i,a.size()) if (a[i] > mx) {pos = i;mx=a[i];};
#define FL(f) bool f = false;
#define NOO cout << -1 << endl;return 0;
#define its(a) a.begin(),a.end()
#define itsr(a) a.rbegin(),a.rend()
#define pb push_back
#define mset multiset
#define pos2 pair<ll,ll>
#define sz(a) (int)a.size()
#define fi first
#define se second
#define mnmx(a,b) {ll __c = a; a = min(a,b), b = max(b,__c);}
#define np nullptr
#define tpl tuple<ll, ll,ll>
#define M 1000000007
vc<vc<char>> mat;
map<ll, ll> has;
db pow_speed(db x, ll c) {
    if (c == 0) return 1;
    if (c == 1) return x;
    if (c % 2) return x * pow_speed(x, c - 1);
    else {
        db v = pow_speed(x, c / 2);
        return  v * v;
    }
}

void solve() {
    cout << fixed << setprecision(7);
    db n, m;db r;
    cin >> n >> m>>r;
    vc<ll> days;
    vector<pair<db, db>> d(n);
    bool f = false;
    for (int i = 0; i < n; i++) {
        cin >> d[i].first >> d[i].second;
        days.push_back(d[i].first);
        if (days.back() == 1)f = true;
    }
    if (not f) {
        days.push_back(1);
        d.push_back({1, 0});
        n++;
    }
    vector<db> dp(n);
    sort(its(days));
    sort(its(d));
    db w = 1 - r;
    dp[0] = d[0].second*r;
    for (int i =1;i<n;i++){
        dp[i] = dp[i - 1] * pow_speed(w, d[i].first - d[i - 1].first) + r * d[i].second;
    }
    ll q;
    for (int i = 0; i < m; i++) {
        cin >> q; 
        ll l = 0, r = n;
        while (r - l > 1) {
            ll m = (r + l) / 2;
            if (days[m] > q) r = m;
            else l = m;
        }
        cout << dp[l] * pow_speed(w, q - days[l]) << " ";
    }
        
    
}
/*
5 6
0.3333333
1 27
6 27
3 27
4 27
5 27
1 2 3 4 5 6

*/
int main() {
    fco;
    //ll _t; cin >> _t;
    //while (_t--)
        solve();
}