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

#pragma GCC optimize("03")
#pragma GCC target("avx2")

using ll = long long;
using ull = unsigned long long;
using ld = long double;
using ii = int;

using namespace std;
string s;

ld kek1() {
    ld val = 0;
    bool f = 0;
    ld cnt = 0;
    for (auto c : s) {
        if (c == '.') {
            f = 1;
        }
        else if (f) {
            val *= 10;
            val += c - '0';
            cnt++;
        }
    }
    return val / pow(10, cnt);
}


int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    ii n, m; cin >> n >> m;
    string ss; cin >> s;
    ld r = kek1();
    vector<pair<ii, ld>> order(n);
    for (ii i = 0; i < n; i++) {
        cin >> order[i].first >> order[i].second;
    }
    sort(order.begin(), order.end());
    queue<pair<ii, ld>> q;
    q.push({ order[0].first, order[0].second * r });
    ld last_result = order[0].second * r;
    for (ii i = 1; i < n; i++) {
        last_result = last_result * pow(1 - r, order[i].first - order[i - 1].first) + order[i].second * r;
        q.push({ order[i].first, last_result });
    }
    const int N = q.size();
    pair<ii, ld> v1;
    pair<ii, ld> v2;
    if (q.size() == 1) {
        v1 = q.front();
        q.pop();
    }
    else {
        v2 = q.front();
        q.pop();
        v1 = q.front();
        q.pop();
    }
    vector<ii> days(m);
    for (ii i = 0; i < m; i++) {
        cin >> days[i];
    }
    for (ii i = 0; i < m; i++) {
        if (N - q.size() == 2 && days[i] < v2.first) {
            cout << 0 << " ";
            continue;
        }
        while (days[i] > v1.first && !q.empty()) {
            v2 = v1;
            v1 = q.front();
            q.pop();
        }
        if (days[i] == v2.first) {
            cout << setprecision(9) << v2.second << " ";
            continue;
        }
        if (days[i] == v1.first) {
            cout << setprecision(9) << v1.second << " ";
            continue;
        }
        if (days[i] < v1.first) {
            cout << setprecision(9) << v2.second * pow(1 - r, days[i] - v2.first) << " ";
            continue;
        }
        if (q.empty()) {
            cout << setprecision(9) << v1.second * pow(1 - r, days[i] - v1.first) << " ";
            continue;
        }
    }
    return 0;
}
