s = input()
tapflag = True

for p in range(len(s)):
  if p % 2 == 0:
    if s[p] != 'R' and s[p] != 'U' and s[p] != 'D':
      tapflag = False
  if p % 2 == 1:
    if s[p] != 'L' and s[p] != 'U' and s[p] != 'D':
      tapflag = False
      
if tapflag:
  print('Yes')
else:
  print('No') s = input() s input() input tapflag = True tapflag True for p in range(len(s)):
  if p % 2 == 0:
    if s[p] != 'R' and s[p] != 'U' and s[p] != 'D':
      tapflag = False
  if p % 2 == 1:
    if s[p] != 'L' and s[p] != 'U' and s[p] != 'D':
      tapflag = False
       p range(len(s)) range len(s) len s if p % 2 == 0:
    if s[p] != 'R' and s[p] != 'U' and s[p] != 'D':
      tapflag = False
   p % 2 == 0 p % 2 p 2 0 if s[p] != 'R' and s[p] != 'U' and s[p] != 'D':
      tapflag = False
   s[p] != 'R' and s[p] != 'U' and s[p] != 'D' s[p] != 'R' and s[p] != 'U' s[p] != 'R' s[p] s p 'R' s[p] != 'U' s[p] s p 'U' s[p] != 'D' s[p] s p 'D' tapflag = False tapflag False if p % 2 == 1:
    if s[p] != 'L' and s[p] != 'U' and s[p] != 'D':
      tapflag = False
       p % 2 == 1 p % 2 p 2 1 if s[p] != 'L' and s[p] != 'U' and s[p] != 'D':
      tapflag = False
       s[p] != 'L' and s[p] != 'U' and s[p] != 'D' s[p] != 'L' and s[p] != 'U' s[p] != 'L' s[p] s p 'L' s[p] != 'U' s[p] s p 'U' s[p] != 'D' s[p] s p 'D' tapflag = False tapflag False if tapflag:
  print('Yes')
else:
  print('No') tapflag print('Yes') print 'Yes' print('No') print 'No' s = input() input() s tapflag = False False tapflag tapflag = True True tapflag tapflag = False False tapflag
s = input()
tapflag = True

for p in range(len(s)):
  if p % 2 == 0:
    if s[p] != 'R' and s[p] != 'U' and s[p] != 'D':
      tapflag = False
  if p % 2 == 1:
    if s[p] != 'L' and s[p] != 'U' and s[p] != 'D':
      tapflag = False
      
if tapflag:
  print('Yes')
else:
  print('No')