#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define int long long
#define ll long long
#define ld long double
#define f first
#define s second
#define pb push_back
#define sz(x) (int) x.size()
#define all(x) begin(x), end(x)
using namespace std;

const int N = 2e5 + 1, inf = LLONG_MAX / 2ll ;

ld bpow(ld x, ll p) {
    if(p == 0) return 1.0;
    if(p % 2 == 1) return x * bpow(x, p - 1);
    ld t = bpow(x, p / 2);
    return t * t;
}

void solve() {
    int n, m;
    cin >> n >> m;
    ld r; cin >> r;
    vector<pair<ll, ll>> a;
    a.push_back({ 1, 0 });
    for(int i = 0; i < n; i++) {
        ll x, y;
        cin >> x >> y;
        a.push_back({ x, y });
    }
    sort(a.begin(), a.end());
    vector<ld> vals(a.size());
    vals[0] = 0;
    for(int i = 1; i < a.size(); i++) {
        vals[i] = bpow(1 - r, a[i].first - a[i - 1].first) * vals[i - 1] + r * a[i].second;
    }
    for(int i = 0; i < m; i++) {
        ll need; cin >> need;
        int l = -1, R = a.size() + 1;
        while(R - l > 1) {
            int m = (l + R) / 2;
            if(a[m].first <= need) l = m;
            else R = m;
        }
        if(a[l].first == m) cout << vals[l];
        else cout << bpow(1.0 - r, need - a[l].first) * vals[l];
        cout << ' ';
    }
    return;
}

signed main() {
    ios_base::sync_with_stdio(NULL);
    cin.tie(0);cout.tie(0);
    int T = 1 ;
    while (T--) {
        solve ( ) ;
    }
    return 0 ;
}