// By ObeliX
#include <bits/stdc++.h>
#pragma GCC target( "sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#include <unordered_map>
#include <cstddef>
#include <cassert>
#include <bitset>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cmath>
#include <queue>
#include <map>
#include <set>
 
using namespace std;
const long long INF = 1e18;
const long long mod = 998244353;
const long long N = 1e6;
const long long M = 1e9 ;
const double eps = 1e-6; 
string alph = "abcdefghijklmnopqrstuvwxyz";
// ||
 
float binpow ( double a, long long n) {
    double res = 1.0;
    while (n) {
        if (n & 1)
            res *= a;
        a *= a;
        n >>= 1;
    }
    return res;
}
 
long long n , m;
double r1;
pair<long long , double> pr[N];
map <long long , double> mp;
map <long long , long long> cnt;
 
int main(){
    //freopen( "cinema.in" , "r" , stdin );
    //freopen( "cinema.out" , "w" , stdout );
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    cin >> n >> m;
    cin >> r1;
    for ( int i = 1 ; i <= n ; i++ ) {
        cin >> pr[i].first >> pr[i].second;
        cnt[pr[i].first] = 1;
    }
    sort( pr + 1 , pr + 1 + n );
    pr[0].first = 1;
    for ( int i = 1 ; i <= n ; i++ ) {
        mp[pr[i].first] = mp[pr[i-1].first] * binpow( ( 1 - r1 ) , pr[i].first - pr[i-1].first ) + double(pr[i].second) * r1;
    }
    for ( int i = 1 ; i <= m ; i++ ) {
        long long x;
        cin >> x;
        if ( cnt[x] == 0 ) {
            long long l = 0 , r = n;
            long long ans = 0;
            while ( r >= l ) {
                long long mid = ( l + r ) / 2;
                if ( pr[mid].first < x ) {
                    ans = mid;
                    l = mid + 1;
                }
                else {
                    r = mid - 1;
                }
            }
            mp[x] = mp[pr[ans].first] * binpow( ( 1 - r1 ) , x - pr[ans].first );
            cnt[x] = 1;
            cout << fixed << setprecision(30) << mp[x] << " ";
        }
        else {
            cout << fixed << setprecision(30)<< mp[x] << " ";
        }
    }
} 
