s=input()

ans='No'

for i,ss in enumerate(s):
  if i%2==0:
    if ss =='R' or ss=='U' or ss=='D':
      ans ='Yes'
    else:
      ans='No'
      break
  else:
    if ss=='L' or ss=='U' or ss=='D':
      ans='Yes'
    else:
      ans='No'
      break
print(ans) s=input() s input() input ans='No' ans 'No' for i,ss in enumerate(s):
  if i%2==0:
    if ss =='R' or ss=='U' or ss=='D':
      ans ='Yes'
    else:
      ans='No'
      break
  else:
    if ss=='L' or ss=='U' or ss=='D':
      ans='Yes'
    else:
      ans='No'
      break i ss enumerate(s) enumerate s if i%2==0:
    if ss =='R' or ss=='U' or ss=='D':
      ans ='Yes'
    else:
      ans='No'
      break
  else:
    if ss=='L' or ss=='U' or ss=='D':
      ans='Yes'
    else:
      ans='No'
      break i%2==0 i%2 i 2 0 if ss =='R' or ss=='U' or ss=='D':
      ans ='Yes'
    else:
      ans='No'
      break
   ss =='R' or ss=='U' or ss=='D' ss =='R' or ss=='U' ss =='R' ss 'R' ss=='U' ss 'U' ss=='D' ss 'D' ans ='Yes' ans 'Yes' ans='No' ans 'No' break if ss=='L' or ss=='U' or ss=='D':
      ans='Yes'
    else:
      ans='No'
      break ss=='L' or ss=='U' or ss=='D' ss=='L' or ss=='U' ss=='L' ss 'L' ss=='U' ss 'U' ss=='D' ss 'D' ans='Yes' ans 'Yes' ans='No' ans 'No' break print(ans) print ans ans='No' 'No' ans ans ='Yes' 'Yes' ans s=input() input() s ans='No' 'No' ans ans='No' 'No' ans ans='Yes' 'Yes' ans
s=input()

ans='No'

for i,ss in enumerate(s):
  if i%2==0:
    if ss =='R' or ss=='U' or ss=='D':
      ans ='Yes'
    else:
      ans='No'
      break
  else:
    if ss=='L' or ss=='U' or ss=='D':
      ans='Yes'
    else:
      ans='No'
      break
print(ans)