#include<bits/stdc++.h>
#define endl '\n'
using namespace std;
void speed()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}
int t,n,m,a[200005],otg=1e9,start;
string s;
void shift(int ind,int tim)
{
    while(tim)
    {
        if(s[ind-1]=='L')
        {
            if(tim<a[ind])
            {
                a[ind]-=tim;
                break;
            }
            else
            {
                tim-=a[ind]-1;
                a[ind]=1;
                s[ind-1]='R';
            }
        }
        else
        {
            if(tim<=m-a[ind])
            {
                a[ind]+=tim;
                break;
            }
            else
            {
                tim-=m-a[ind];
                a[ind]=m;
                s[ind-1]='L';
            }
        }
    }
}
void resh1()
{
    if(s[0]=='R')start=m-a[1];
    if(s[0]=='L')start=(m-1)+(a[1]-1);
    for(int i=1;i<=n;i++)
    {
        shift(i,start);
    }
    cout<<m-(a[1]-a[2])/2<<endl;
}
void resh2()
{
    if(m==1)
    {
        cout<<0<<endl;
        return;
    }
    int tim=start;
    if(s[1]=='R')
    {
        tim+=(a[1]-a[2])/2;
    }
    else
    {
        tim+=m*2-2-(a[1]-a[2])/2;
    }
    cout<<1<<endl;
    cout<<tim<<" "<<m-(a[1]-a[2])/2<<endl;
}
void read()
{
    cin>>t>>n>>m;
    int br1=0,br2=0;
    for(int i=1;i<=n;i++)
    {
        cin>>a[i];
        if(a[i]%2==0)br2++;
        else br1++;
    }
    cin>>s;
    if(t==1)
    {
        if(br1==n||br2==n)cout<<"Yes"<<endl;
        else cout<<"No"<<endl;
    }
    if(t==2)
    {
        if(br1==n||br2==n)
        {
            cout<<"Yes"<<endl;
            resh1();
        }
        else cout<<"No"<<endl;
    }
    if(t==3)
    {
        if(br1==n||br2==n)
        {
            cout<<"Yes"<<endl;
            resh1();
            resh2();
        }
        else cout<<"No"<<endl;
    }
}
int main()
{
    speed();
    read();
	return 0;
}
