#include <cmath>
#include <cstddef>
#include <iostream>
#include <vector>
#include <iomanip>

struct Prod {
    int day = -1;
    int w = 0;

    Prod(int d, int ww) : day(d), w(ww) {}
};

int main() {
    int n, m;
    std::cin >> n >> m;

    double r;
    std::cin >> r;

    std::vector<Prod> production;
    int max = 0;

    for (int i = 0; i < n; ++i) {
        int day, w;
        std::cin >> day >> w;
        if (max < day) {
            max = day;
        }
        production.emplace_back(day, w);
    }

    ++max;


    std::vector<int> sorted(max);
    for (auto& e : production) {
        sorted[e.day] = e.w;
    }

    std::vector<double> res(max);
    double prev = 0;
    for (int i = 0; i < max; ++i) {
        prev = sorted[i] * r + prev * (1 - r);
        res[i] = prev;
    }

    int q;
    std::vector<double> ans;
    for (int i = 0; i < m; ++i) {
        std::cin >> q;
        if (q >= max) {
            ans.push_back(res[max - 1] * std::pow(1 - r, q - max + 1));
        } else {
            ans.push_back(res[q]);
        }
    }
    
    for (const auto& e : ans) {
        std::cout << std::setprecision(10) <<  e << ' ';
    }

    return 0;
}