import sys
s=input()
cnt=0
for x in s:
  cnt+=1
  if x in ['U','D']:
    continue
  elif cnt %2 and x =='R':
    continue
  elif cnt%2==0 and x=='L':
    continue
  else:
    print('No')
    sys.exit()
print('Yes') import sys sys s=input() s input() input cnt=0 cnt 0 for x in s:
  cnt+=1
  if x in ['U','D']:
    continue
  elif cnt %2 and x =='R':
    continue
  elif cnt%2==0 and x=='L':
    continue
  else:
    print('No')
    sys.exit() x s cnt+=1 cnt 1 if x in ['U','D']:
    continue
  elif cnt %2 and x =='R':
    continue
  elif cnt%2==0 and x=='L':
    continue
  else:
    print('No')
    sys.exit() x in ['U','D'] x ['U','D'] 'U' 'D' continue elif cnt %2 and x =='R':
    continue
   cnt %2 and x =='R' cnt %2 cnt 2 x =='R' x 'R' continue elif cnt%2==0 and x=='L':
    continue
   cnt%2==0 and x=='L' cnt%2==0 cnt%2 cnt 2 0 x=='L' x 'L' continue print('No') print 'No' sys.exit() sys.exit sys exit print('Yes') print 'Yes' cnt=0 0 cnt cnt+=1 1 cnt s=input() input() s
import sys
s=input()
cnt=0
for x in s:
  cnt+=1
  if x in ['U','D']:
    continue
  elif cnt %2 and x =='R':
    continue
  elif cnt%2==0 and x=='L':
    continue
  else:
    print('No')
    sys.exit()
print('Yes')