odd='RUD'
even='LUD'
s=input()
flag=0
for i in range(len(s)):
  a=i+1
  if a%2==0:
    if s[i] not in even:
      flag=1
      break
  else:
    if s[i] not in odd:
      flag=1
      break
if flag==1:
  print ('No')
else:
  print ('Yes') odd='RUD' odd 'RUD' even='LUD' even 'LUD' s=input() s input() input flag=0 flag 0 for i in range(len(s)):
  a=i+1
  if a%2==0:
    if s[i] not in even:
      flag=1
      break
  else:
    if s[i] not in odd:
      flag=1
      break i range(len(s)) range len(s) len s a=i+1 a i+1 i 1 if a%2==0:
    if s[i] not in even:
      flag=1
      break
  else:
    if s[i] not in odd:
      flag=1
      break a%2==0 a%2 a 2 0 if s[i] not in even:
      flag=1
      break
   s[i] not in even s[i] s i even flag=1 flag 1 break if s[i] not in odd:
      flag=1
      break s[i] not in odd s[i] s i odd flag=1 flag 1 break if flag==1:
  print ('No')
else:
  print ('Yes') flag==1 flag 1 print ('No') print 'No' print ('Yes') print 'Yes' even='LUD' 'LUD' even flag=1 1 flag a=i+1 i+1 a odd='RUD' 'RUD' odd flag=0 0 flag flag=1 1 flag s=input() input() s
odd='RUD'
even='LUD'
s=input()
flag=0
for i in range(len(s)):
  a=i+1
  if a%2==0:
    if s[i] not in even:
      flag=1
      break
  else:
    if s[i] not in odd:
      flag=1
      break
if flag==1:
  print ('No')
else:
  print ('Yes')