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