//#include <bits/stdc++.h>
#include <iostream>
#include <algorithm>
#include <queue>
#include <set>
#include <map>
#include<iomanip>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
#define ent "\n"
#define f first
#define s second

const int maxn = 1e6 + 100;
const int inf = (int)1e9 + 100;
const ll INF = (ll)1e18;
const int MOD = 1e9 + 7;
const int maxl = 20;
const ll P = 31;
int n, m;
long double r;
long double ans[maxn];

long double bpow(long double x, int n){
    if(!n) return 1;
    if(n&1) return bpow(x, n-1) * x;
    long double y = bpow(x, n/2);
    return y*y;
}

signed main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0), cout.tie(0);
    cin >> n >> m >> r;
    vector<pii>v;
    for(int i=1; i<=n; i++) {
        int a, b;
        cin >> a >> b;
        v.push_back({a, b});
    }
    for(int i=1; i<=m; i++){
        int x; cin >> x;
        v.push_back({x, 1e9+i});
    }
    long double sum = 0;
    int day = 1;
    sort(v.begin(), v.end());
    for(auto to: v){
        if(to.s > 1e9){
            sum *= bpow(1-r, to.f-day);
            ans[to.s-(int)1e9] = sum;
        } else{
           sum = sum * bpow(1-r, to.f-day);
           sum += r * to.s;
        } day = to.f;
    }
    cout << fixed << setprecision(7);
    for(int i=1; i<=m; i++) cout << ans[i] << " ";
}