#include<cstdio>
#include<algorithm>
const int N=100007;
int n,lp=0,p=0,as[N];
double xm,ym,S,S1=0,L,R;
char s[16];
struct pos{double x,y;}ps[N];
struct ln{
double k,b;
double x(double y){return (y-b)/k;}
double y(double x){return k*x+b;}
bool operator<(ln w)const{return k!=w.k?k<w.k:b>w.b;}
bool in(pos w){return y(w.x)<=w.y;}
pos operator&(ln w){
double x=(w.b-b)/(k-w.k);
return (pos){x,y(x)};
}
}ls[N];
int main(){
scanf("%d%lf%lf%lf",&n,&xm,&L,&R);
ym=R-L;
S=xm*ym;
for(int i=1;i<=n;++i)scanf("%d",as+i);
ls[lp++]=(ln){0,0};
for(int i=1,b;i<=n;++i){
scanf("%s%d",s,&b);
if(s[0]==‘E‘)b*=-1;
ls[lp++]=(ln){as[i]+1,-L-b};
}
std::sort(ls,ls+lp);
for(int i=0;i<lp;++i){
if(i&&ls[i].k==ls[i-1].k)continue;
while(p>=2&&!ls[i].in(ls[p-2]&ls[p-1]))--p;
ls[p++]=ls[i];
}
while(p>=2&&(ls[p-2]&ls[p-1]).x>xm)--p;
int p0=0;
while(p-p0>=2&&(ls[p0]&ls[p0+1]).x<0)++p0;
ps[p0]=(pos){0,ls[p0].y(0)};
if(ps[p0].y>=ym)return puts("0.0000"),0;
for(int i=p0+1;i<p;++i)ps[i]=ls[i]&ls[i-1];
ps[p]=(pos){xm,ls[p-1].y(xm)};
if(ps[p].y>ym){
while(p-p0>=2&&(ls[p-2]&ls[p-1]).y>ym)--p;
ps[p]=(pos){ls[p-1].x(ym),ym};
}
for(int i=p0+1;i<=p;++i){
S1+=(ps[i].x-ps[i-1].x)*(ym*2-ps[i].y-ps[i-1].y);
}
printf("%.4f",S1/S/2);
return 0;
}