import sys



S = list(eval(input()))



odd = S[::2]

even = S[1::2]



flag = True



for i in odd:

      if i == 'L':

            flag = False

            break

for j in even:

      if j =='R':

            flag = False

            break



if flag:

      print('Yes')

else:

      print('No')

            
s=eval(input())

for i in range(len(s)):

      if i%2==0 and s[i]=='L':

            print("No")

            exit()

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

            print("No")

            exit()

print('Yes')

  
import sys

S = list(eval(input()))
odd = S[::2]
even = S[1::2]
flag = True
for i in odd:
    if i == "L":
        flag = False
        break
for j in even:
    if j == "R":
        flag = False
        break
if flag:
    print("Yes")
else:
    print("No")

s = eval(input())
for i in range(len(s)):
    if i % 2 == 0 and s[i] == "L":
        print("No")
        exit()
    if i % 2 == 1 and s[i] == "R":
        print("No")
        exit()
print("Yes")

-import sys - -S = list(eval(input())) -odd = S[::2] -even = S[1::2] -flag = True -for i in odd: -    if i == "L": -        flag = False -        break -for j in even: -    if j == "R": -        flag = False -        break -if flag: -    print("Yes") -else: -    print("No") +s = eval(input()) +for i in range(len(s)): +    if i % 2 == 0 and s[i] == "L": +        print("No") +        exit() +    if i % 2 == 1 and s[i] == "R": +        print("No") +        exit() +print("Yes")