#include <bits/stdc++.h>
#define in freopen ("input.txt", "r", stdin);
#define out freopen("output.txt", "w", stdout);
#define se second
#define fi first
#define ll long long int
#define ld long double
#define llu unsigned long long int
#define pb push_back
const int val = (2e5) + 5;
const int inf = (1e9) + 7;
double eps = 0.000000001;
using namespace std;
map<int, double> mp;
void solve()
{
    ll a, b, x = 0;
    double c;
    mp[0] = 0;
    cin >> a >> b >> c;
    vector <pair <int, int>> vc;
    for(int i = 0; i < a; i ++)
    {
        int d, e;
        cin >> d >> e;
        vc.push_back({d, e});
    }
    sort(vc.begin(), vc.end());
    for(int i = 1; i < 1e9; i ++)
    {
        if(vc[x].first == i)
        {
            mp[i] = mp[i - 1] * (1 - c) + (vc[x].second * c);
            x ++;
        }
        else
        {
            mp[i] = mp[i - 1] * (1 - c);
        }
    }
    for(int i = 0; i < b; i ++)
    {
        int f;
        cin >> f;
        cout << fixed << setprecision(6) << mp[f] << " ";
    }
}
int main()
{
    ios_base::sync_with_stdio(0);
    int t = 1;
    //cin >> test;
    while(t --)
    {
        solve();
        cout << endl;
    }
}
