#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define F first
#define S second
#define alla(x, n, c) sort( x + c, x + n + c )
#define allv(x) sort( x.begin(), x.end() )
#define reva(x, n, c) reverse( x + c, x + n + c )
#define revv(x) reverse( x.begin(), x.end() )
#define sz(x) (x).size()
#define nl "\n"
#define IAmTheOneWhoKnocks ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define int double
vector<pair<int,int> >v;
map<int,int>mp;
vector<int>v2;
void solve()
{
  int n,m;
  cin>>n>>m;
  int d,w;
  int r;
  cin>>r;
  for(int i=00;i<n;i++){
        cin>>d>>w;
        v.push_back({d,w});
  }
  for(int i=0;i<m;i++){
        cin>>d;
    v.push_back({d,0});
    v2.push_back(d);
  }
  sort(v.begin(),v.end());
  int cnt=0,cnt1=0;
  for(int i=0;i<v.size();i++){
    cnt=cnt+v[i].second*r;
    mp[v[i].first]=cnt;
    int cnt2;
    if(v.size()-1!=i){
        cnt2=v[i+1].first-v[i].first;
    }else{
        cnt2=1;
    }
    cnt=cnt*pow((1-r),cnt2);
  }
  for(int i=0;i<v2.size();i++){
    cout<<fixed <<setprecision(6) <<mp[v2[i]]<<" ";
  }
}

signed main()
{
    IAmTheOneWhoKnocks
    int T = 1;
    //cin >>T;
    while( T-- )
    { solve(); }
    return 0;
}
