#include <bits/stdc++.h>
#define endl '\n'
#define int ll
#define ve vector
#define pb push_back
#define all(x) x.begin() , x.end()
#define pii pair <int , int>
#define F first
#define S second

using namespace std;
typedef long long ll;
typedef long double ld;

ld bin_pow(ld a , int b)
{
    ld ans = 1.00000000000000;
    while(b != 0)
    {
        if(b % 2)
        {
            ans *= a;
        }
        a *= a;
        b /= 2;
    }
    return ans;
}

ld geom(ld b1 , ld k , int len)
{
    return b1 * (bin_pow(k , len) - 1.000000) / ld(k - 1);
}

int32_t main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    #ifdef LOCAL
        freopen("input.txt" , "r" , stdin);
        freopen("output.txt" , "w" , stdout);
    #endif // LOCAL
    int n , m;
    cin >> n >> m;
    ld k;
    cin >> k;
    ve <pii> all_d;
    int d[n] , w[n];
    map <int , int> dop;
    for(int i = 0;i < n;++ i)
    {
        cin >> d[i] >> w[i];
        all_d.pb({d[i] , 0});
        dop[d[i]] = w[i];
    }
    int q[m];
    ld answer[m];
    map <int , int> nom;
    for(int i = 0;i < m;++ i)
    {
        cin >> q[i];
        all_d.pb({q[i] , 1});
        nom[q[i]] = i;
    }
    sort(all(all_d));
    ld now = 0;
    ll lst = 1;
    ld ed = 1;
    for(int i = 0;i < all_d.size();++ i)
    {
        ll day = all_d[i].F;
        int fl = all_d[i].S;
        now *= bin_pow((ed - k) , day - lst);
        if(fl == 0)
        {
            now = now + dop[day] * k;
        }
        else
        {
            answer[nom[day]] = now;
        }
        lst = day;
    }
    for(auto to : answer)
    {
        cout << fixed << setprecision(10) << to << endl;
    }
    return 0;

}
