import sys
s = input()

l1 = ['L', 'U', 'D']
l2 = ['R', 'U', 'D']

cnt = 0
for i in range(len(s)):
  if i == 0 or i%2 == 0:
    if s[i] not in l2:
      print('No')
      sys.exit()
  else:
    if s[i] not in l1:
      print('No')
      sys.exit()

print('Yes') import sys sys s = input() s input() input l1 = ['L', 'U', 'D'] l1 ['L', 'U', 'D'] 'L' 'U' 'D' l2 = ['R', 'U', 'D'] l2 ['R', 'U', 'D'] 'R' 'U' 'D' cnt = 0 cnt 0 for i in range(len(s)):
  if i == 0 or i%2 == 0:
    if s[i] not in l2:
      print('No')
      sys.exit()
  else:
    if s[i] not in l1:
      print('No')
      sys.exit() i range(len(s)) range len(s) len s if i == 0 or i%2 == 0:
    if s[i] not in l2:
      print('No')
      sys.exit()
  else:
    if s[i] not in l1:
      print('No')
      sys.exit() i == 0 or i%2 == 0 i == 0 i 0 i%2 == 0 i%2 i 2 0 if s[i] not in l2:
      print('No')
      sys.exit()
   s[i] not in l2 s[i] s i l2 print('No') print 'No' sys.exit() sys.exit sys exit if s[i] not in l1:
      print('No')
      sys.exit() s[i] not in l1 s[i] s i l1 print('No') print 'No' sys.exit() sys.exit sys exit print('Yes') print 'Yes' s = input() input() s cnt = 0 0 cnt l2 = ['R', 'U', 'D'] ['R', 'U', 'D'] l2 l1 = ['L', 'U', 'D'] ['L', 'U', 'D'] l1
import sys
s = input()

l1 = ['L', 'U', 'D']
l2 = ['R', 'U', 'D']

cnt = 0
for i in range(len(s)):
  if i == 0 or i%2 == 0:
    if s[i] not in l2:
      print('No')
      sys.exit()
  else:
    if s[i] not in l1:
      print('No')
      sys.exit()

print('Yes')