s=input() 
ans=0
for i in range(0,len(s),2):
  if s[i]!='R' and s[i]!='U'  and s[i]!='D':
    ans=1
for j in range(1,len(s),2):
  if s[j]!='U' and s[j]!='L' and s[j]!='D':
    ans=1
if ans==0:
  print('Yes')
else:
  print('No') s=input() s input() input ans=0 ans 0 for i in range(0,len(s),2):
  if s[i]!='R' and s[i]!='U'  and s[i]!='D':
    ans=1 i range(0,len(s),2) range 0 len(s) len s 2 if s[i]!='R' and s[i]!='U'  and s[i]!='D':
    ans=1 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' ans=1 ans 1 for j in range(1,len(s),2):
  if s[j]!='U' and s[j]!='L' and s[j]!='D':
    ans=1 j range(1,len(s),2) range 1 len(s) len s 2 if s[j]!='U' and s[j]!='L' and s[j]!='D':
    ans=1 s[j]!='U' and s[j]!='L' and s[j]!='D' s[j]!='U' and s[j]!='L' s[j]!='U' s[j] s j 'U' s[j]!='L' s[j] s j 'L' s[j]!='D' s[j] s j 'D' ans=1 ans 1 if ans==0:
  print('Yes')
else:
  print('No') ans==0 ans 0 print('Yes') print 'Yes' print('No') print 'No' ans=1 1 ans ans=1 1 ans s=input() input() s ans=0 0 ans
s=input() 
ans=0
for i in range(0,len(s),2):
  if s[i]!='R' and s[i]!='U'  and s[i]!='D':
    ans=1
for j in range(1,len(s),2):
  if s[j]!='U' and s[j]!='L' and s[j]!='D':
    ans=1
if ans==0:
  print('Yes')
else:
  print('No')
