s=str(input())
d=True

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

for i in range(len(s)):
  if i%2==0:
    if s[i]!="R" and s[i]!="U" and s[i]!="D":
      d=False
  else:
    if s[i]!="L" and s[i]!="U" and s[i]!="D":
      d=False
if d:
  print("Yes")
else:
  print("No")