S = input()

print(("Yes", "No")["L" in S[::2] or "R" in S[1::2]]) S = input() S input() input print(("Yes", "No")["L" in S[::2] or "R" in S[1::2]]) print ("Yes", "No")["L" in S[::2] or "R" in S[1::2]] ("Yes", "No") "Yes" "No" "L" in S[::2] or "R" in S[1::2] "L" in S[::2] "L" S[::2] S ::2 2 "R" in S[1::2] "R" S[1::2] S 1::2 1 2 S = input() input() S
S = input()

print(("Yes", "No")["L" in S[::2] or "R" in S[1::2]])