S = str(input())

flag = True
for i in range(len(S)):
  if i%2==0 and S[i]=="L":
    flag = False
  elif i%2!=0 and S[i]=="R":
    flag = False
if flag:
  print("Yes")
else:
  print("No") S = str(input()) S str(input()) str input() input flag = True flag True for i in range(len(S)):
  if i%2==0 and S[i]=="L":
    flag = False
  elif i%2!=0 and S[i]=="R":
    flag = False i range(len(S)) range len(S) len S if i%2==0 and S[i]=="L":
    flag = False
  elif i%2!=0 and S[i]=="R":
    flag = False i%2==0 and S[i]=="L" i%2==0 i%2 i 2 0 S[i]=="L" S[i] S i "L" flag = False flag False elif i%2!=0 and S[i]=="R":
    flag = False i%2!=0 and S[i]=="R" i%2!=0 i%2 i 2 0 S[i]=="R" S[i] S i "R" flag = False flag False if flag:
  print("Yes")
else:
  print("No") flag print("Yes") print "Yes" print("No") print "No" flag = False False flag S = str(input()) str(input()) S flag = True True flag flag = False False flag
S = str(input())

flag = True
for i in range(len(S)):
  if i%2==0 and S[i]=="L":
    flag = False
  elif i%2!=0 and S[i]=="R":
    flag = False
if flag:
  print("Yes")
else:
  print("No")