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