import math

S = list(input())
a =0
b = 0
n=len(S)
for i in range(0,n,2):
  if(S[i]=="R" or S[i]=="U" or S[i]=="D"):
    a +=1
for j in range(1,n,2):
  if(S[j]=="L" or S[j]=="U" or S[j]=="D"):
    b+=1
if(a==math.ceil(n/2) and b ==math.floor(n/2)):
  print("Yes")
else:
  print("No") import math math S = list(input()) S list(input()) list input() input a =0 a 0 b = 0 b 0 n=len(S) n len(S) len S for i in range(0,n,2):
  if(S[i]=="R" or S[i]=="U" or S[i]=="D"):
    a +=1 i range(0,n,2) range 0 n 2 if(S[i]=="R" or S[i]=="U" or S[i]=="D"):
    a +=1 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" a +=1 a 1 for j in range(1,n,2):
  if(S[j]=="L" or S[j]=="U" or S[j]=="D"):
    b+=1 j range(1,n,2) range 1 n 2 if(S[j]=="L" or S[j]=="U" or S[j]=="D"):
    b+=1 S[j]=="L" or S[j]=="U" or S[j]=="D" S[j]=="L" or S[j]=="U" S[j]=="L" S[j] S j "L" S[j]=="U" S[j] S j "U" S[j]=="D" S[j] S j "D" b+=1 b 1 if(a==math.ceil(n/2) and b ==math.floor(n/2)):
  print("Yes")
else:
  print("No") a==math.ceil(n/2) and b ==math.floor(n/2) a==math.ceil(n/2) a math.ceil(n/2) math.ceil math ceil n/2 n 2 b ==math.floor(n/2) b math.floor(n/2) math.floor math floor n/2 n 2 print("Yes") print "Yes" print("No") print "No" b = 0 0 b b+=1 1 b a =0 0 a n=len(S) len(S) n S = list(input()) list(input()) S a +=1 1 a
import math

S = list(input())
a =0
b = 0
n=len(S)
for i in range(0,n,2):
  if(S[i]=="R" or S[i]=="U" or S[i]=="D"):
    a +=1
for j in range(1,n,2):
  if(S[j]=="L" or S[j]=="U" or S[j]=="D"):
    b+=1
if(a==math.ceil(n/2) and b ==math.floor(n/2)):
  print("Yes")
else:
  print("No")