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