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