s = input()
n = len(s)
c = 0
for i in range(n):
  if (i%2 == 0):
    if (s[i] == "L"):
      c = 1
  else:
    if (s[i] == "R"):
      c = 1
if (c == 0):
  print("Yes")
else:
  print("No") s = input() s input() input n = len(s) n len(s) len s c = 0 c 0 for i in range(n):
  if (i%2 == 0):
    if (s[i] == "L"):
      c = 1
  else:
    if (s[i] == "R"):
      c = 1 i range(n) range n if (i%2 == 0):
    if (s[i] == "L"):
      c = 1
  else:
    if (s[i] == "R"):
      c = 1 i%2 == 0 i%2 i 2 0 if (s[i] == "L"):
      c = 1
   s[i] == "L" s[i] s i "L" c = 1 c 1 if (s[i] == "R"):
      c = 1 s[i] == "R" s[i] s i "R" c = 1 c 1 if (c == 0):
  print("Yes")
else:
  print("No") c == 0 c 0 print("Yes") print "Yes" print("No") print "No" c = 1 1 c c = 0 0 c c = 1 1 c n = len(s) len(s) n s = input() input() s
s = input()
n = len(s)
c = 0
for i in range(n):
  if (i%2 == 0):
    if (s[i] == "L"):
      c = 1
  else:
    if (s[i] == "R"):
      c = 1
if (c == 0):
  print("Yes")
else:
  print("No")