S = input()
N=len(S)
x="Yes"
for i in range(0,N):
    if i%2==0 and S[i]=="L":
        x="No"
        break
    elif i%2==1 and S[i]=="R":
        x="No"
        break
print(x) S = input() S input() input N=len(S) N len(S) len S x="Yes" x "Yes" for i in range(0,N):
    if i%2==0 and S[i]=="L":
        x="No"
        break
    elif i%2==1 and S[i]=="R":
        x="No"
        break i range(0,N) range 0 N if i%2==0 and S[i]=="L":
        x="No"
        break
    elif i%2==1 and S[i]=="R":
        x="No"
        break i%2==0 and S[i]=="L" i%2==0 i%2 i 2 0 S[i]=="L" S[i] S i "L" x="No" x "No" break elif i%2==1 and S[i]=="R":
        x="No"
        break i%2==1 and S[i]=="R" i%2==1 i%2 i 2 1 S[i]=="R" S[i] S i "R" x="No" x "No" break print(x) print x N=len(S) len(S) N x="No" "No" x S = input() input() S x="No" "No" x x="Yes" "Yes" x
S = input()
N=len(S)
x="Yes"
for i in range(0,N):
    if i%2==0 and S[i]=="L":
        x="No"
        break
    elif i%2==1 and S[i]=="R":
        x="No"
        break
print(x)