a=input()
b=0
if (len(a))%2==0:
  for i in range(int(len(a)/2)):
    if a[2*i]=="R" or a[2*i]=="U" or a[2*i]=="D":
      b=b+1
    if a[2*i+1]=="L" or a[2*i+1]=="U" or a[2*i+1]=="D":
      b=b+1
  if b==len(a):
    print("Yes")
  else:
    print("No")
if (len(a))%2==1:
  for i in range(int(len(a)/2)+1):
    if a[2*i]=="R" or a[2*i]=="U" or a[2*i]=="D":
      b=b+1
  for i in range(int(len(a)/2)):
    if a[2*i+1]=="L" or a[2*i+1]=="U" or a[2*i+1]=="D":
      b=b+1
  if b==len(a):
    print("Yes")
  else:
    print("No") a=input() a input() input b=0 b 0 if (len(a))%2==0:
  for i in range(int(len(a)/2)):
    if a[2*i]=="R" or a[2*i]=="U" or a[2*i]=="D":
      b=b+1
    if a[2*i+1]=="L" or a[2*i+1]=="U" or a[2*i+1]=="D":
      b=b+1
  if b==len(a):
    print("Yes")
  else:
    print("No") (len(a))%2==0 (len(a))%2 len(a) len a 2 0 for i in range(int(len(a)/2)):
    if a[2*i]=="R" or a[2*i]=="U" or a[2*i]=="D":
      b=b+1
    if a[2*i+1]=="L" or a[2*i+1]=="U" or a[2*i+1]=="D":
      b=b+1
   i range(int(len(a)/2)) range int(len(a)/2) int len(a)/2 len(a) len a 2 if a[2*i]=="R" or a[2*i]=="U" or a[2*i]=="D":
      b=b+1
     a[2*i]=="R" or a[2*i]=="U" or a[2*i]=="D" a[2*i]=="R" or a[2*i]=="U" a[2*i]=="R" a[2*i] a 2*i 2 i "R" a[2*i]=="U" a[2*i] a 2*i 2 i "U" a[2*i]=="D" a[2*i] a 2*i 2 i "D" b=b+1 b b+1 b 1 if a[2*i+1]=="L" or a[2*i+1]=="U" or a[2*i+1]=="D":
      b=b+1
   a[2*i+1]=="L" or a[2*i+1]=="U" or a[2*i+1]=="D" a[2*i+1]=="L" or a[2*i+1]=="U" a[2*i+1]=="L" a[2*i+1] a 2*i+1 2*i 2 i 1 "L" a[2*i+1]=="U" a[2*i+1] a 2*i+1 2*i 2 i 1 "U" a[2*i+1]=="D" a[2*i+1] a 2*i+1 2*i 2 i 1 "D" b=b+1 b b+1 b 1 if b==len(a):
    print("Yes")
  else:
    print("No") b==len(a) b len(a) len a print("Yes") print "Yes" print("No") print "No" if (len(a))%2==1:
  for i in range(int(len(a)/2)+1):
    if a[2*i]=="R" or a[2*i]=="U" or a[2*i]=="D":
      b=b+1
  for i in range(int(len(a)/2)):
    if a[2*i+1]=="L" or a[2*i+1]=="U" or a[2*i+1]=="D":
      b=b+1
  if b==len(a):
    print("Yes")
  else:
    print("No") (len(a))%2==1 (len(a))%2 len(a) len a 2 1 for i in range(int(len(a)/2)+1):
    if a[2*i]=="R" or a[2*i]=="U" or a[2*i]=="D":
      b=b+1
   i range(int(len(a)/2)+1) range int(len(a)/2)+1 int(len(a)/2) int len(a)/2 len(a) len a 2 1 if a[2*i]=="R" or a[2*i]=="U" or a[2*i]=="D":
      b=b+1
   a[2*i]=="R" or a[2*i]=="U" or a[2*i]=="D" a[2*i]=="R" or a[2*i]=="U" a[2*i]=="R" a[2*i] a 2*i 2 i "R" a[2*i]=="U" a[2*i] a 2*i 2 i "U" a[2*i]=="D" a[2*i] a 2*i 2 i "D" b=b+1 b b+1 b 1 for i in range(int(len(a)/2)):
    if a[2*i+1]=="L" or a[2*i+1]=="U" or a[2*i+1]=="D":
      b=b+1
   i range(int(len(a)/2)) range int(len(a)/2) int len(a)/2 len(a) len a 2 if a[2*i+1]=="L" or a[2*i+1]=="U" or a[2*i+1]=="D":
      b=b+1
   a[2*i+1]=="L" or a[2*i+1]=="U" or a[2*i+1]=="D" a[2*i+1]=="L" or a[2*i+1]=="U" a[2*i+1]=="L" a[2*i+1] a 2*i+1 2*i 2 i 1 "L" a[2*i+1]=="U" a[2*i+1] a 2*i+1 2*i 2 i 1 "U" a[2*i+1]=="D" a[2*i+1] a 2*i+1 2*i 2 i 1 "D" b=b+1 b b+1 b 1 if b==len(a):
    print("Yes")
  else:
    print("No") b==len(a) b len(a) len a print("Yes") print "Yes" print("No") print "No" b=0 0 b b=b+1 b+1 b a=input() input() a b=b+1 b+1 b b=b+1 b+1 b b=b+1 b+1 b
a=input()
b=0
if (len(a))%2==0:
  for i in range(int(len(a)/2)):
    if a[2*i]=="R" or a[2*i]=="U" or a[2*i]=="D":
      b=b+1
    if a[2*i+1]=="L" or a[2*i+1]=="U" or a[2*i+1]=="D":
      b=b+1
  if b==len(a):
    print("Yes")
  else:
    print("No")
if (len(a))%2==1:
  for i in range(int(len(a)/2)+1):
    if a[2*i]=="R" or a[2*i]=="U" or a[2*i]=="D":
      b=b+1
  for i in range(int(len(a)/2)):
    if a[2*i+1]=="L" or a[2*i+1]=="U" or a[2*i+1]=="D":
      b=b+1
  if b==len(a):
    print("Yes")
  else:
    print("No")