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