#include <bits/stdc++.h>
#define int long long
#define ll long long
#define str string
#define ld long double
#define run_vasya_run ios_base::sync_with_stdio(0) , cin.tie(0) ,cout.tie(0)
#define uint unsigned long long
#define fi first
#define se second
#define pb push_back
#define open freopen ("log.in", "r", stdin);
#define close freopen("log.out", "w", stdout);
using namespace std;
const int MOD = 10000000007;
ll _ , n , m , den;
map<ll,ll>used;
vector<pair<ll,ld>>v , ans;
map<ll,ll>d , w;
ll l , mid , r1;
ld r , pr , x;
ld binpow(ld a , ll n)
{
    if(n == 1)
    {
        return a;
    }
    else if(n % 2 == 1)
    {
        return (a * binpow(a , n - 1));
    }
    else
    {
        ld p = binpow(a , n / 2);
        return (p * p);
    }
}
main()
{
    //run_vasya_run;
    _ = 1;
    //open;
    //close;
    //cin >> _;
    while(_ --)
    {
        cin >> n >> m;
        cin >> r;
        for(ll i = 1;i <= n;i++){
            cin >> d[i] >> w[i];
            used[d[i]] = w[i];
            v.push_back({d[i], w[i]});
        }
        v.push_back({0 , 0});
        sort(v.begin(), v.end());
        for(ll i = 1;i < v.size();i++){
            if(v[i].fi - v[i - 1].fi - 1 > 0){
                x *= binpow(1 - r , v[i].fi - v[i - 1].fi - 1);
            }
            x *= (1 - r);
            x = x + r * v[i].se;
            ans.push_back({v[i].fi , x});
        }
        for(int i = 1;i <= m;i ++)
        {
            cin >> den;
            l = 0;
            r1 = ans.size();
            while(l + 1 < r1)
            {
                mid = (l + r1) / 2;
                if(ans[mid].fi <= den)
                {
                    l = mid;
                }
                else
                {
                    r1 = mid;
                }
            }
            if(ans[l].fi > den)
            {
                cout << 0 << endl;
            }
            else
            {
                if(den == ans[l].fi)
                {
                    cout << fixed << setprecision(6) << ans[l].se << endl;
                }
                else{
                //    cout << den - ans[l].fi << ' ' << 1 - r << ' ' << binpow(1 - r , den - ans[l].fi) << ' ' << ans[l].se << endl;
                    cout << fixed << setprecision(6) << binpow(1 - r , den - ans[l].fi) * ans[l].se << endl;
                }
            }
        }
    }
}
