s = input()

odd  = [ (c in 'RUD') for i, c in enumerate(s) if i % 2 == 0 ]
even = [ (c in 'LUD') for i, c in enumerate(s) if i % 2 == 1 ]

if all(odd) and all(even):
  print('Yes')
else:
  print('No') s = input() s input() input (c in 'RUD') for i, c in enumerate(s) if i % 2 == 0 for i, c in enumerate(s) if i % 2 == 0 i c enumerate(s) enumerate s i % 2 == 0 i % 2 i 2 0 if i % 2 == 0 c in 'RUD' c 'RUD' odd  = [ (c in 'RUD') for i, c in enumerate(s) if i % 2 == 0 ] odd [ (c in 'RUD') for i, c in enumerate(s) if i % 2 == 0 ] (c in 'LUD') for i, c in enumerate(s) if i % 2 == 1 for i, c in enumerate(s) if i % 2 == 1 i c enumerate(s) enumerate s i % 2 == 1 i % 2 i 2 1 if i % 2 == 1 c in 'LUD' c 'LUD' even = [ (c in 'LUD') for i, c in enumerate(s) if i % 2 == 1 ] even [ (c in 'LUD') for i, c in enumerate(s) if i % 2 == 1 ] if all(odd) and all(even):
  print('Yes')
else:
  print('No') all(odd) and all(even) all(odd) all odd all(even) all even print('Yes') print 'Yes' print('No') print 'No' s = input() input() s odd  = [ (c in 'RUD') for i, c in enumerate(s) if i % 2 == 0 ] [ (c in 'RUD') for i, c in enumerate(s) if i % 2 == 0 ] odd even = [ (c in 'LUD') for i, c in enumerate(s) if i % 2 == 1 ] [ (c in 'LUD') for i, c in enumerate(s) if i % 2 == 1 ] even
s = input()

odd  = [ (c in 'RUD') for i, c in enumerate(s) if i % 2 == 0 ]
even = [ (c in 'LUD') for i, c in enumerate(s) if i % 2 == 1 ]

if all(odd) and all(even):
  print('Yes')
else:
  print('No')
