#include <bits/stdc++.h>
#define FAST ios_base::sync_with_stdio(0) , cin.tie(0) , cout.tie(0);
#define ll long long
#define str string
#define ld long double
#define pb push_back
#define pf push_front
#define pob pop_back();
#define pof pop_front();
#define in insert
#define fi first
#define se second
#define begin begin()
#define end end()
#define size size()
#define rend rend()
#define rbegin rbegin()
#define ret return
#define ull unsigned long long
#define all(a) a.begin , a.end
#define gcd(a , b) __gcd(a , b)
#define lcm(a , b) (a * b) / gcd(a , b)
#define all(a) a.begin , a.end
#define friopen freopen ("in.in", "r", stdin); freopen("out.out", "w", stdout);
using namespace std;

///                         ERASE
/*




str --  a.erase(index nachala , kolichesvo simvolov);


deque , vector -- a.erase(a.begin + index nachala , a.begin + index konca + 1);




*/




const ld EPS = 0.00000000000001;

ld qpow(ld  a, ll n)
{
    if(n == 0LL)
    {
        return 1.0;
    }
    if(n%2 == 1)
    {
        return (a*qpow(a, n-1));
    }
    ld tmp = qpow(a, n/2);
    return (tmp*tmp);
}

void kol_a()
{

}


void kol_b()
{
    cout << fixed << setprecision(10);
    ll n , m , i , j , u , v , mid , d;
    ld r , t;
    cin >> n >> m >> r;
    pair<ll , ll> a[n + 1];
    deque<pair<ll , ld>> ans;
    for (i = 1 ; i <= n ; i ++) cin >> a[i].fi >> a[i].se;
    sort(a + 1 , a + 1 + n);
    for (i = 1 ; i <= n ; i ++)
    {
        if (i == 1)
        {
            ans.pb({a[i].fi - 1 , 0});
            ans.pb({a[i].fi , a[i].se * r});
            continue;
        }
        t = ans[ans.size - 1].se;
        t = t * qpow((1 - r) , a[i].fi - a[i - 1].fi);
        ans.pb({a[i].fi , t + a[i].se * r});
    }
    while(m --)
    {
        cin >> d;
        u = -1;
        v = ans.size;
        while(u + 1 < v)
        {
            mid = (u + v) / 2;
            if (ans[mid].fi <= d) u = mid;
            else v = mid;
        }
        cout << ans[u].se * qpow((1 - r) , d - ans[u].fi) << " ";
    }
}


int main()
{
    FAST
    ll _ = 1;
    //fflush(stdout);
    //cin >> _;
    while(_ --) kol_b();
}

/*

*/
