S = input()
judge = True
for n in range(len(S)):
  if n % 2 == 0:
    if S[n] not in ["R","U","D"]:
      judge = False
      break
  else:
    if S[n] not in ["L","U","D"]:
      judge = False
      break
if judge:
  print("Yes")
else:
  print("No") S = input() S input() input judge = True judge True for n in range(len(S)):
  if n % 2 == 0:
    if S[n] not in ["R","U","D"]:
      judge = False
      break
  else:
    if S[n] not in ["L","U","D"]:
      judge = False
      break n range(len(S)) range len(S) len S if n % 2 == 0:
    if S[n] not in ["R","U","D"]:
      judge = False
      break
  else:
    if S[n] not in ["L","U","D"]:
      judge = False
      break n % 2 == 0 n % 2 n 2 0 if S[n] not in ["R","U","D"]:
      judge = False
      break
   S[n] not in ["R","U","D"] S[n] S n ["R","U","D"] "R" "U" "D" judge = False judge False break if S[n] not in ["L","U","D"]:
      judge = False
      break S[n] not in ["L","U","D"] S[n] S n ["L","U","D"] "L" "U" "D" judge = False judge False break if judge:
  print("Yes")
else:
  print("No") judge print("Yes") print "Yes" print("No") print "No" judge = True True judge judge = False False judge S = input() input() S judge = False False judge
S = input()
judge = True
for n in range(len(S)):
  if n % 2 == 0:
    if S[n] not in ["R","U","D"]:
      judge = False
      break
  else:
    if S[n] not in ["L","U","D"]:
      judge = False
      break
if judge:
  print("Yes")
else:
  print("No")