#include <iostream>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <list>
#include <unordered_set>
#include <unordered_map>
#include <cstdio>
#include <random>
#include <chrono>

using namespace std;

using ll = long long;
using ld = long double;

mt19937_64 rnd(chrono::steady_clock::now().time_since_epoch().count());

#define int long long
#define all(x) (x).begin(), (x).end()

long double bp(long double a, ll n) {
    if (n == 0) return 1;
    if (n & 1) return bp(a, n - 1) * a;
    return bp(a * a, n / 2);
}

void solve() {
    ll n, m;
    cin >> n >> m;
    long double k;
    cin >> k;
    vector<pair<ll, long double>> a;
    vector<ll> days;
    days.push_back(0);
    a.push_back({0, 0});
    ll day;
    long double el;
    for (int i = 0; i < n; i++) {
        cin >> day >> el;
        a.push_back({day, el});
        days.push_back(day);
    }
    sort(all(a));
    sort(all(days));
    vector<ld> pr(n + 1);
    pr[0] = 0;
    for (int i = 1; i <= n; i++) {
        pr[i] = pr[i - 1] * bp(1 - k, a[i].first - a[i - 1].first);
        pr[i] += a[i].second * k;
    }
    cout << fixed << setprecision(12);
    for (int i = 0; i < m; i++) {
        cin >> day;
        auto it = (upper_bound(all(days), day) - 1) - days.begin();
        if (a[it].first == day) {
            cout << pr[it] << '\n';
        } else {
            cout << pr[it] * bp(1 - k, day - a[it].first) << '\n';
        }
    }
}

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    ll timer = 1;
    // cin >> timer;
    while (timer--) {
        solve();
    }
    return 0;
}

/*
#.#.#.....
.......##.
.#..#.....
.#........
.#..##....
..........
####...#..
.......#..
.......#..
##........

 */