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