#include <stdio.h>

#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <random>
#include <chrono>
#include <queue>
#include <functional>
#include <iostream>
#include <queue>
//#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define ld long double

const ll maxn = 1e6 + 1, maxm = 1e7 + 1;
const ll mod = 1500000059, mod2 = 998244353, inf = 1e9, block = 550, hb = 1000012337, base = 1000050017;
const ld eps = 1e-3;

int n, m;
ld r;
ld d[maxn], w[maxn], ans[maxn];
int q[maxn];
ld bp(ld a, ll n){
    ld res = 1;
    while ( n > 0){
        if (n & 1){
            res *= a;
        }
        a *= a, n >>= 1;
    }
    return res;
}
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0), cout.tie(0);
    cin >> n >> m;
    cin >> r;
    vector<pair<int, int>> vec;
    for (int i = 1; i <= n; ++i){
        cin >> d[i] >> w[i];
        vec.pb(mp(d[i], i));
    }
    vector<pair<int, int>> lol;
    for (int i = 1; i <= m; ++i){
        cin >> q[i];
        lol.pb(mp(q[i], i));
    }

    sort(vec.begin(), vec.end());
    vector<pair<int, ld>> kek;
    ld sum = 0;
    int last = 0;
    for (auto it : vec){
        sum = sum * bp(1 - r, it.f - last) + r * w[it.s];
        kek.pb(mp(it.f, sum));
       // cout << it.f << " " << sum << '\n';
        last = it.f;
    }
    int uk = -1;
    sort(lol.begin(), lol.end());
    for (int i = 0; i < m; ++i){
        while (uk + 1 < n && kek[uk + 1].f <= lol[i].f){
            uk += 1;
        }
        if (uk == -1){
            cout << 0 << '\n';
            continue;
        }
        cout << fixed << setprecision(9) << kek[uk].s * bp(1 - r, lol[i].f - kek[uk].f) << '\n';
    }
}












