#include   <iostream>
#include    <fstream>
#include    <sstream>
#include    <iomanip>
#include    <utility>
#include     <vector>
#include       <list>
#include     <string>
#include      <stack>
#include      <queue>
#include      <deque>
#include        <set>
#include        <map>
#include  <algorithm>
#include <functional>
#include    <numeric>
#include     <bitset>
#include    <complex>
#include     <cstdio>
#include    <cstring>
#include      <cmath>
#include     <math.h>
#include   <string.h>
#include    <cstdlib>
#include      <ctime>
#include    <climits>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define ones __builtin_popcount
#define INF 1000000000
#define y1 yy1
const int N = 1e5 + 100;
const ll MOD = 1e9 + 7;
const int P = 31 /*1e9 + 7*/;
ll n,m;
double r;
ll b[N];
ll q[N];
double a[N];
int main(){
    

    
    //            freopen("ex.in","r",stdin);
    //            freopen("ex.out","w",stdout);
    
    
    //    cal();
    //    kal();
    
    cin>>n>>m;
    cin>>r;
    for(int i=0;i<n;i++){
        int w,d;
        cin>>d>>w;
        b[d]=w;
    }
    for(int i=0;i<m;i++){
        cin>>q[i];
    }
    if(r==0){
        for(int i=0;i<m;i++){
            cout<<0<<' ';
        }
        return 0;
    }
    a[1]=r*double(b[1]);
    for(int i=2;i<=b[m-1];i++){
        a[i]=b[i]*(r);
        a[i]+=a[i-1]*(1-r);
        //cout<<i<<' '<<a[i]<<'\n';
    }
    for(int i=0;i<m;i++){
        if(b[m-1]<q[i]){
            cout<<fixed;
            cout<<setprecision(6)<<a[b[m-1]]*pow((i-r),q[i]-b[m-1])<<' ';
        }
        cout<<fixed;
        cout<<setprecision(6)<<a[q[i]]<<' ';
    }
    return 0;
}