s = eval(input())

flag = True



for i in range(1, len(s) + 1):

    

    if i % 2 == 1:

        if s[i-1] == 'L':

            flag = False

            

    else:

        if s[i-1] == 'R':

            flag = False



if flag:

    print('Yes')

else:

    print('No')
S=eval(input())



cnt=0

for i in range(len(S)):

    if i%2==0:

        if S[i]=='L':

            cnt+=1

    else:

        if S[i]=='R':

            cnt+=1

if cnt==0:

    print('Yes')

else:

    print('No')

s = eval(input())
flag = True
for i in range(1, len(s) + 1):
    if i % 2 == 1:
        if s[i - 1] == "L":
            flag = False
    else:
        if s[i - 1] == "R":
            flag = False
if flag:
    print("Yes")
else:
    print("No")

S = eval(input())
cnt = 0
for i in range(len(S)):
    if i % 2 == 0:
        if S[i] == "L":
            cnt += 1
    else:
        if S[i] == "R":
            cnt += 1
if cnt == 0:
    print("Yes")
else:
    print("No")

-s = eval(input()) -flag = True -for i in range(1, len(s) + 1): -    if i % 2 == 1: -        if s[i - 1] == "L": -            flag = False +S = eval(input()) +cnt = 0 +for i in range(len(S)): +    if i % 2 == 0: +        if S[i] == "L": +            cnt += 1 -        if s[i - 1] == "R": -            flag = False -if flag: +        if S[i] == "R": +            cnt += 1 +if cnt == 0: