S=input()
so=[]
se=[]
for i in range(len(S)):
  if i%2==1:
    se.append(S[i])
  else:
    so.append(S[i])
if (se.count("R")+so.count("L"))==0:
  print("Yes")
else:
  print("No") S=input() S input() input so=[] so [] se=[] se [] for i in range(len(S)):
  if i%2==1:
    se.append(S[i])
  else:
    so.append(S[i]) i range(len(S)) range len(S) len S if i%2==1:
    se.append(S[i])
  else:
    so.append(S[i]) i%2==1 i%2 i 2 1 se.append(S[i]) se.append se append S[i] S i so.append(S[i]) so.append so append S[i] S i if (se.count("R")+so.count("L"))==0:
  print("Yes")
else:
  print("No") (se.count("R")+so.count("L"))==0 se.count("R")+so.count("L") se.count("R") se.count se count "R" so.count("L") so.count so count "L" 0 print("Yes") print "Yes" print("No") print "No" se=[] [] se S=input() input() S so=[] [] so
S=input()
so=[]
se=[]
for i in range(len(S)):
  if i%2==1:
    se.append(S[i])
  else:
    so.append(S[i])
if (se.count("R")+so.count("L"))==0:
  print("Yes")
else:
  print("No")
