#include <vector>
#include <string>
#include <map>
#include <set>
#include <algorithm>
#include <cmath>
#include <iostream>

using namespace std;
using ll = long long;

int main()
{
    cin.tie(0); cout.tie(0);
    cout.precision(7); cin.precision(7);
    ll n, m; cin >> n >> m;
    double k; cin >> k;
    double q;
    ll p;
    if (k == 0) {
        for (ll i = 0; i < m; i++) {
            cout << 0 << ' ';
        }
        return 0;
    }
    map <ll, double> a;
    for (ll i = 0; i < n; i++) {
        cin >> p >> q;
        a[p] = q;
    }
    ll mx = -228;
    map <ll, ll> c;
    for (ll i = 0; i < m; i++) {
        cin >> p;
        mx = max(mx, p);
        c.push_back(p);
    }
    map <ll, double> b;
    for (ll i = 1; i <= mx; i++) {
        b[i] = double(1 - k) * b[i - 1] + k * a[i];
    }
    for (ll i = 0; i < c.size(); i++) {
        cout << b[c[i]] << ' ';
    }
};