#include <bits/stdc++.h>

#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,avx,mmx,tune=native")
//#include <ext/pb_ds/detail/standard_policies.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
#define elif else if
#define pb push_back
#define fast cout.tie(nullptr); cin.tie(nullptr); ios_base::sync_with_stdio(false);
#define all(x) x.begin(), x.end()
#define rall(x) (x).rbegin(), (x).rend()
#define str to_string
#define sz(x) int(x.size())
using ll = long long;
using vl = vector<ll>;
#define ld long double
using ull = unsigned long long;
const int N = 1e6 + 1;
#define F first
#define S second
#define watch(x) cout << #x << " <----  " << x << endl
const int mod = 1e9 + 7;
const int INF = 1e9;
vector<int> adj[N];
int n, m;
vector<pair<int, int>> v;
ld binpow(ld a, ll b){
    if(b == 0) return 1.0;
    else if(b & 1){
        return a * binpow(a, b - 1);
    }
    else{
        ld x = binpow(a, b / 2);
        return x * x; 
    }
}
void solve() {
    cin >> n >> m;
    ld r;
    cin >> r;
    ld x = 0.0;
    ll l = 0;
    vector<pair<int, ld>> vec;
    for(int i = 0; i < n; i++){
        int d, w;
        cin >> d >> w;
        v.pb({d, w});
    }
    sort(all(v));
    vec.pb({0,0.0});
    for(int i = 0; i < n; i++){
        x *= binpow(1 - r, v[i].F - l - 1);
        x = x * (1.0 - r) + v[i].S * r;
        vec.pb({v[i].F, x});
        l = v[i].F;
    }
    while(m--){
        int q;
        cin >> q;
        int lo = 0;
        int hi = sz(vec) - 1;
        int ans = -1;
        while(lo <= hi){
            int mid = (lo + hi) / 2;
            if(vec[mid].F <= q){
                lo = mid + 1;
                ans = mid;
            }
            else{
                hi = mid - 1;
            }
        }
        // cout << vec[ans].S << endl;
        ld x = vec[ans].S;
        x *= binpow((1 - r), q - vec[ans].F);
        cout <<fixed << setprecision(7) << x << ' ';
    }
}


int32_t main() {
    fast
    int tt = 1;
    //cin >> tt;
    while (tt--) {
        solve();
    }
}
