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