#include <iostream>
#include <unordered_map>
#include <vector>
#include <algorithm>
#include <cmath>

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

    std::unordered_map<int, int> production_days;
    int max_inspection_day = 0;

    for (int i = 0; i < n; ++i) {
        int day, raw_material;
        std::cin >> day >> raw_material;
        production_days[day] = raw_material;
        max_inspection_day = std::max(max_inspection_day, day);
    }

    std::vector<int> inspection_days(m);
    for (int i = 0; i < m; ++i) {
        std::cin >> inspection_days[i];
    }

    double waste = 0;
    std::vector<double> result;

    for (int day = 1; day <= std::max(max_inspection_day, *std::max_element(inspection_days.begin(), inspection_days.end())); ++day) {
        if (production_days.find(day) != production_days.end()) {
            waste = (1 - r) * waste + r * production_days[day];
        } else {
            waste *= (1 - r);
        }

        if (std::find(inspection_days.begin(), inspection_days.end(), day) != inspection_days.end()) {
            double formatted_val = round(waste * 1000000) / 1000000;
            int after_decimal = static_cast<int>(std::fmod(formatted_val * 1000000, 1000000));
            if (after_decimal > 900000) {
                formatted_val = std::round(formatted_val);
            } else if (std::fmod(formatted_val, 1) == 0) {
                formatted_val = std::round(formatted_val);
            }
            result.push_back(formatted_val);
        }
    }

    for (const auto &res : result) {
        std::cout << res << " ";
    }

    return 0;
}
