#include <bits/stdc++.h>

using namespace std;

//#pragma GCC target( "sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#pragma GCC optimize("Ofast,unroll-loops,fast-math,O3")

#define ff first
#define ss second
#define vt vector
#define pb push_back
#define ppb pop_back
#define all(a) a.begin(), a.end()
#define ent "\n"
#define sp ' '
#define sz(x) (int)x.size()

using ll  = long long;
using db  = double;
using ldb = long double;
using pll = pair <ll, ll>;
using pii = pair <int, int>;

const ll  INF = 8e18;
const ll  inf = 1e9 + 7;
const int MOD = 998244353;
const int bln = 200;
const int M   = 2e3 + 7;
const int N   = 2e5 + 7;

/*-------------------------main-------------------------*/

db ans[N];
pii a[N];

db bin_pow(db a, int b){
    if (b == 0) return 1;
    if (b % 2 == 0){
        db x = bin_pow(a, b / 2);
        return x * x;
    }
    return bin_pow(a, b - 1) * a;
}

void solve() {
    #define test
    int n, m;
    cin >> n >> m;
    db k;
    cin >> k;
    for (int i = 1; i <= n; i++){
        cin >> a[i].ff >> a[i].ss;
    }
    sort(a + 1, a + n + 1);
    ans[0] = 0.0;
    for (int i = 1; i <= n; i++){
        ans[i] = ans[i - 1] * bin_pow(1 - k, a[i].ff - a[i - 1].ff) + a[i].ss * k;
    }
    while (m--){
        int j;
        cin >> j;
        int l = 1, r = n;
        while (l <= r){
            int mid = (l + r) >> 1;
            if (a[mid].ff > j) r = mid - 1;
            else l = mid + 1;
        }
        l--;
        cout << fixed << setprecision(6) << ans[l] * bin_pow(1 - k, j - a[l].ff) << sp;
    }
}

void precalc() {

}

signed main() {
//  freopen("lca.in", "r", stdin);
//  freopen("lca.out", "w", stdout);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    precalc();
    int testcases;
    #ifdef tests
        cin >> testcases;
    #endif
    #ifdef test
        testcases = 1;
    #endif
    while (testcases--) {
        solve();
    }
    return 0;
}
