S = eval(input())

k = 'Yes'



for i in range(len(S)):

	if i % 2 == 0:

		if S[i] == 'L':

			k = 'No'

			break 

	else:

		if S[i] == 'R':

			k = 'No'

			break

	

print(k)

S = eval(input())

result = 'Yes'

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

  #print(i)

  if (i % 2 == 0 and S[i-1] == "R") or (i % 2 == 1 and S[i-1] == "L"):

      result = 'No'

      break

      

print(result)

      

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

S = eval(input())
result = "Yes"
for i in range(1, len(S) + 1):
    # print(i)
    if (i % 2 == 0 and S[i - 1] == "R") or (i % 2 == 1 and S[i - 1] == "L"):
        result = "No"
        break
print(result)

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