#include <bits/stdc++.h>
using namespace std;
#define ios ios::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL);
#define pb push_back
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define fr first
#define sc second
#define endl "\n"
#define ll long long
#define int ll
void fopn(string name){
	freopen((name+".in").c_str(),"r",stdin);
	freopen((name+".out").c_str(),"w",stdout);
}
const ll N=2e5+5,INF=1e18,mod=1e9+7;
double binpow(double a, int b){
	if(b==0) return 1;
	if(b%2==1) return a*binpow(a,b-1);
	double k=binpow(a,b/2);
	return k*k;
	
}
struct node{
	int day, val, id;
};
void solve(){
	 int n,m;
	 double r;
	 cin>>n>>m>>r;
	 vector<node> a;
	 for(int i=0;i<n;i++){
		int x,y;cin>>x>>y;
		a.pb({x,y,0});
	 }
	 for(int i=0;i<m;i++){
		 int q;cin>>q;
		 a.pb({q,INF,i});
	 }
	 sort(all(a), [&](node i, node j){
		 if(i.day==j.day){
			 if(i.val==j.val) return i.id<j.id;
			 return i.val<j.val;
		 }
		 return i.day<j.day;
	 });
	 double cur=0;
	 double day=0;
	 vector<double> ans(m);
	 for(int i=0;i<(int)a.size();i++){
		 if(a[i].val!=INF){
			 cur*=binpow(1-r,a[i].day-day);//<-
			 day=a[i].day;
			 cur+=r*a[i].val;
		 }
		 else{
			 ans[a[i].id]=cur*binpow(1-r,a[i].day-day);
		 }
	 }
	 cout<<fixed<<setprecision(10);
	 for(int i=0;i<m;i++)
		cout<<ans[i]<<' ';
	 
}
main(){
	//ios;
	int T=1;
	//cin>>T;
	for(int i=1;i<=T;i++){
		//cout<<"Case #"<<i<<": ";
		solve();
	}
}

