S=input()
print("YNeos"["L" in S[0::2] or "R" in S[1::2]::2]) S=input() S input() input print("YNeos"["L" in S[0::2] or "R" in S[1::2]::2]) print "YNeos"["L" in S[0::2] or "R" in S[1::2]::2] "YNeos" "L" in S[0::2] or "R" in S[1::2]::2 "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 2 S=input() input() S
S=input()
print("YNeos"["L" in S[0::2] or "R" in S[1::2]::2])