S = eval(input())

flag =0

for i in range(len(S)):

  if i % 2 == 1 and S[i] == 'R':

    flag=1

    break

  elif(i % 2 == 0 and S[i] == 'L'):

    flag=1

    break

ans = "Yes" if flag == 0 else "No"

print(ans)

  
S = eval(input())



print(("No" if "L" in S[::2] or "R" in S[1::2] else "Yes"))



S = eval(input())
flag = 0
for i in range(len(S)):
    if i % 2 == 1 and S[i] == "R":
        flag = 1
        break
    elif i % 2 == 0 and S[i] == "L":
        flag = 1
        break
ans = "Yes" if flag == 0 else "No"
print(ans)

S = eval(input())
print(("No" if "L" in S[::2] or "R" in S[1::2] else "Yes"))

-flag = 0 -for i in range(len(S)): -    if i % 2 == 1 and S[i] == "R": -        flag = 1 -        break -    elif i % 2 == 0 and S[i] == "L": -        flag = 1 -        break -ans = "Yes" if flag == 0 else "No" -print(ans) +print(("No" if "L" in S[::2] or "R" in S[1::2] else "Yes"))