S = input()

check = True
for i, s in enumerate(S):
  if (i+1)%2 == 0:
    if not(s == "L" or s == "U" or s == "D"):
      check = False
  else:
    if not(s == "R" or s == "U" or s == "D"):
      check = False

if check:
  print("Yes")
else:
  print("No") S = input() S input() input check = True check True for i, s in enumerate(S):
  if (i+1)%2 == 0:
    if not(s == "L" or s == "U" or s == "D"):
      check = False
  else:
    if not(s == "R" or s == "U" or s == "D"):
      check = False i s enumerate(S) enumerate S if (i+1)%2 == 0:
    if not(s == "L" or s == "U" or s == "D"):
      check = False
  else:
    if not(s == "R" or s == "U" or s == "D"):
      check = False (i+1)%2 == 0 (i+1)%2 i+1 i 1 2 0 if not(s == "L" or s == "U" or s == "D"):
      check = False
   not(s == "L" or s == "U" or s == "D") s == "L" or s == "U" or s == "D" s == "L" or s == "U" s == "L" s "L" s == "U" s "U" s == "D" s "D" check = False check False if not(s == "R" or s == "U" or s == "D"):
      check = False not(s == "R" or s == "U" or s == "D") s == "R" or s == "U" or s == "D" s == "R" or s == "U" s == "R" s "R" s == "U" s "U" s == "D" s "D" check = False check False if check:
  print("Yes")
else:
  print("No") check print("Yes") print "Yes" print("No") print "No" S = input() input() S check = True True check check = False False check check = False False check
S = input()

check = True
for i, s in enumerate(S):
  if (i+1)%2 == 0:
    if not(s == "L" or s == "U" or s == "D"):
      check = False
  else:
    if not(s == "R" or s == "U" or s == "D"):
      check = False

if check:
  print("Yes")
else:
  print("No")