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