S =str(input())
S.split()

kisu = ['R', 'U', 'D']
gusu = ['L', 'U', 'D']
c = 0

for i in range(len(S)):
  if i%2 == 0:
    if S[i] in kisu:
      c += 1
  else:
    if S[i] in gusu:
      c += 1
      

if c == len(S):
  print('Yes')
else:
  print('No')
       S =str(input()) S str(input()) str input() input S.split() S.split S split kisu = ['R', 'U', 'D'] kisu ['R', 'U', 'D'] 'R' 'U' 'D' gusu = ['L', 'U', 'D'] gusu ['L', 'U', 'D'] 'L' 'U' 'D' c = 0 c 0 for i in range(len(S)):
  if i%2 == 0:
    if S[i] in kisu:
      c += 1
  else:
    if S[i] in gusu:
      c += 1
       i range(len(S)) range len(S) len S if i%2 == 0:
    if S[i] in kisu:
      c += 1
  else:
    if S[i] in gusu:
      c += 1
       i%2 == 0 i%2 i 2 0 if S[i] in kisu:
      c += 1
   S[i] in kisu S[i] S i kisu c += 1 c 1 if S[i] in gusu:
      c += 1
       S[i] in gusu S[i] S i gusu c += 1 c 1 if c == len(S):
  print('Yes')
else:
  print('No')
       c == len(S) c len(S) len S print('Yes') print 'Yes' print('No') print 'No' kisu = ['R', 'U', 'D'] ['R', 'U', 'D'] kisu c += 1 1 c c += 1 1 c gusu = ['L', 'U', 'D'] ['L', 'U', 'D'] gusu c = 0 0 c S =str(input()) str(input()) S
S =str(input())
S.split()

kisu = ['R', 'U', 'D']
gusu = ['L', 'U', 'D']
c = 0

for i in range(len(S)):
  if i%2 == 0:
    if S[i] in kisu:
      c += 1
  else:
    if S[i] in gusu:
      c += 1
      

if c == len(S):
  print('Yes')
else:
  print('No')
      
