S = input()
flag = True
for i in range(len(S)):
  if (i+1) % 2 == 1:
    if S[i] =="R" or S[i] =="U" or S[i] =="D":
      pass
    else:
      flag = False
      break
  else:
    if S[i] =="L" or S[i] =="U" or S[i] =="D":
      pass
    else:
      flag = False
      break
if flag:
  print("Yes")
else:
  print("No") S = input() S input() input flag = True flag True for i in range(len(S)):
  if (i+1) % 2 == 1:
    if S[i] =="R" or S[i] =="U" or S[i] =="D":
      pass
    else:
      flag = False
      break
  else:
    if S[i] =="L" or S[i] =="U" or S[i] =="D":
      pass
    else:
      flag = False
      break i range(len(S)) range len(S) len S if (i+1) % 2 == 1:
    if S[i] =="R" or S[i] =="U" or S[i] =="D":
      pass
    else:
      flag = False
      break
  else:
    if S[i] =="L" or S[i] =="U" or S[i] =="D":
      pass
    else:
      flag = False
      break (i+1) % 2 == 1 (i+1) % 2 i+1 i 1 2 1 if S[i] =="R" or S[i] =="U" or S[i] =="D":
      pass
    else:
      flag = False
      break
   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" flag = False flag False break if S[i] =="L" or S[i] =="U" or S[i] =="D":
      pass
    else:
      flag = False
      break 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" flag = False flag False break if flag:
  print("Yes")
else:
  print("No") flag print("Yes") print "Yes" print("No") print "No" flag = False False flag flag = False False flag flag = True True flag S = input() input() S
S = input()
flag = True
for i in range(len(S)):
  if (i+1) % 2 == 1:
    if S[i] =="R" or S[i] =="U" or S[i] =="D":
      pass
    else:
      flag = False
      break
  else:
    if S[i] =="L" or S[i] =="U" or S[i] =="D":
      pass
    else:
      flag = False
      break
if flag:
  print("Yes")
else:
  print("No")